2

When I am send request for trading I am getting response with "tradeofferid" in both steam account. but when I checked that "tradeofferId" in getoffers list request I am getting only one's steam account's "tradeofferid".

I can't understand what the different between both account. both account has same setting and both are active account. but one account has zero balance .

Koraktor
  • 41,357
  • 10
  • 69
  • 99

2 Answers2

1

You need to modify the query based on which offers you want to see. In particular, there are the following two parameters of the IEconService/GetTradeOffers method:

  • get_sent_offers: Set to 1 to get the offers that the account has sent
  • get_received_offers: Set to 1 to get the offers that the account has received.
Koraktor
  • 41,357
  • 10
  • 69
  • 99
  • Thanks For answer. but here I am saying that.. I have one website account and two user account. I am creating game by one user by sending assets to my website account and joined game by second user account to sending assets to my website account. then get list of offer by getoffers request buti the offerid generated from first account is not found in list ... I already set get_sent_offers and get_received_offers is 1. – PRIYAL LIMBANI Jan 10 '17 at 09:26
  • You should probably update your question with some code and maybe API replies. There’s not much anyone is able to help based on your problem description. – Koraktor Jan 10 '17 at 09:29
1

<?php 
$url = 'https://steamcommunity.com/tradeoffer/new/send';
 $data = array(
  'sessionid' => $sessionId,
  'serverid' => '1',
  'partner' => '76561198316682086',
  'tradeoffermessage' => 'test',
  'trade_offer_create_params' => '{"trade_offer_access_token": "5xsvx0BF"}',  
  'json_tradeoffer' => '{"newversion":true,"version":2,"them":{"assets":[],"currency":[],"ready":false},"them":{"assets":[{"appid":730,"contextid":"2","amount":1,"assetid":"8606185394"},{"appid":730,"contextid":"2","amount":1,"assetid":"8606185369"}],"currency":[],"ready":false}}'
 );
 $c = curl_init();
 curl_setopt($c, CURLOPT_HEADER, false);
 curl_setopt($c, CURLOPT_NOBODY, false);
 curl_setopt($c, CURLOPT_URL, $url);
 curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
 curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)");
 curl_setopt($c, CURLOPT_COOKIE, $cookies);
 curl_setopt($c,enter code here CURLOPT_POST, 1);
 curl_setopt($c, CURLOPT_POSTFIELDS, http_build_query($data));
 curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($c, CURLOPT_HTTPHEADER, array('Referer: https://steamcommunity.com/tradeoffer/new/?partner=356416358&token=5xsvx0BF'));
 curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
 curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($c, CURLOPT_CUSTOMREQUEST, strtoupper('POST'));
 $response = curl_exec($c);
 curl_close($c);
 echo $response;

//get offerid in response.  {"tradeofferid":12345..}
//but not found that offerid in getoffers
$getOffers = array(
  "get_received_offers"=>'1',
  "get_sent_offers"=>'1',
  //"active_only"=>'1',
 );
 $getoffersData = array();
 $getoffersData = $steam->getOffers($getOffers);
 echo "<pre>";print_r($getoffersData); 

?>