PHP code example of digitaltim-de / steam-market-api-v2
1. Go to this page and download the library: Download digitaltim-de/steam-market-api-v2 library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
digitaltim-de / steam-market-api-v2 example snippets
$options = [
'start' => 0,
'count' => 100,
'query' => '',
'exact' => true,
'filters' => [
'category_730_Type[]' => 'tag_Type_CustomPlayer' //For finding Agent type
]
];
$response = $api->searchItems(730, $options);
$options = [
'country' => 'US',
'language' => 'english',
'currency' => 1,
];
$response = $api->getNewlyListed($options);
$options = [
'steamId' => '76561197986603983',
'contextId' => 2,
'count' => 50,
'language' => 'english',
'startAssetId' => ''
];
$response = $api->getUserInventory(730, $options);
$options = [
'steamId' => '76561197986603983',
'contextId' => 2,
];
$response = $api->getUserInventoryV2(730, $options);
$options = [
'inspect_link' => 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M3130517023148833575A18217556235D3377922844091506969',
'detailed' => false,
'minimal' => false
];
$response = $api->inspectItem($options);
$options = [
'inspect_link' => 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M3130517023148833575A18217556235D3377922844091506969',
'detailed' => false,
];
$response = $api->inspectItemV2($options);
$response = $api->getCurrencyList();
$response = $api->getExteriorList();
$response = $api->getUserAgents('Chrome');
$proxy = [
CURLOPT_PROXY => '81.201.60.130:80',
CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
CURLOPT_TIMEOUT => 9,
CURLOPT_CONNECTTIMEOUT => 6,
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36',
...
];
$response = $api->getMarketListings(730, $options, $proxy);