logo Developer API
General API calls


Intro

Welcome to the BitSkins Developer API. This API helps you control your BitSkins account through our JSON-based API. You can do so using the following available methods.

All of the following methods require the API Key, which you can retrieve through the settings page after you enable API access for your account. All API calls are accessible through GET and POST methods. For instance, you can visit the following URL to retrieve your account's balance:

	
https://bitskins.com/api/v1/get_account_balance/?api_key=API_KEY
	
      

In order to use the API, you need to have Secure Access (two-factor authentication) enabled for your account. This is for your protection. In order to execute API calls successfully, you will need to generate two-factor codes programatically since they expire every 30 seconds. This protects against accidentally leaked API keys and some man-in-the-middle attacks on your account.

You will need to use your two-factor secret shown when you enable Secure Access to your account. If you do not have this code, simply disable two-factor authentication and re-enable it.

The interactive widget you will see under the respective API calls here once your account is Secure Access-verified generates the codes automatically.

Default API throttle limits are 8 requests per second. Contact us if you need higher limits.


Generating Secure Access Codes

  

// install 'notp', 'thirty-two' packages first
var totp = require('notp').totp;
var base32 = require('thirty-two');

// print out a code that's valid right now
console.log(totp.gen(base32.decode('SECRET_SHOWN_BY_BITSKINS')));

  

You will need to synchronize your device's clock for the above code(s) to work:

	
# Ubuntu Example:

$ sudo apt-get install ntp -y
	
      

Using Different Steam Games' Inventories

As of 09/17/2017, you can now use different games' inventories at BitSkins for trading/buying/selling purposes. Game-specific API endpoints are listed below, with the optional parameter app_id. If this parameter is not specified, the API requests are interpreted as being for CS:GO (Counter-Strike: Global Offensive) by default to avoid breaking CS:GO-specific developer implementations.

The available games at BitSkins are as follows. Please note that this list may be expanded at any time in the future, so check back!

Game NameShort Nameapp_idcontext_id
Counter-Strike: Global OffensiveCSGO7302
Defense of the Ancients 2DotA25702
PlayerUnknown's BattlegroundsPUBG5780802
Team Fortress 2TF24402
PayDay 2PD22186202
RustRUST2524902
Killing Floor 2KF22320902

Please note that the context_id parameter can be provided alongside, but this is not currently required.


Get Account Balance

Allows you to retrieve your available and pending balance in all currencies supported by BitSkins.

Endpoint
/api/v1/get_account_balance

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.

Example Request

          
https://bitskins.com/api/v1/get_account_balance/?api_key=API_KEY&code=CODE
           
        

Get All Item Prices

Allows you to retrieve the entire price database used at BitSkins.

Endpoint
/api/v1/get_all_item_prices

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_all_item_prices/?api_key=API_KEY&code=CODE&app_id=APP_ID
           
        

Get Market Data

Allows you to retrieve basic price data for items currently on sale at BitSkins.

Endpoint
/api/v1/get_price_data_for_items_on_sale

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_price_data_for_items_on_sale/?api_key=API_KEY&code=CODE&app_id=APP_ID
           
        

Get Account Inventory

Allows you to retrieve your account's available inventory on Steam (items listable for sale), your BitSkins inventory (items currently on sale), and your pending withdrawal inventory (items you delisted or purchased).

As of January 20th 2016, only the newest 5,000 items are shown by default for the BitSkins inventory. Use page numbers to see all items.

Endpoint
/api/v1/get_my_inventory

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
page
Page number for BitSkins inventory. (optional)
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_my_inventory/?api_key=API_KEY&code=CODE&page=PAGE&app_id=APP_ID
           
        

Get Inventory On Sale

Allows you to retrieve the BitSkins inventory currently on sale. This includes items you cannot buy (i.e., items listed for sale by you). By default, upto 24 items per page, and optionally up to 480 items per page. This method allows you to search the inventory just as the search function on the website allows you to search inventory.

Multiple simultaneous calls to this method may result in 'Failed to acquire lock' errors.

Endpoint
/api/v1/get_inventory_on_sale

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
page
Page number. (optional)
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)
sort_by
{created_at|price}. CS:GO only: wear_value. (optional)
order
{desc|asc} (optional)
market_hash_name
Full or partial item name (optional)
min_price
Minimum price (optional)
max_price
Maximum price (optional)
has_stickers
{-1|0|1}. For CS:GO only. (optional)
is_stattrak
{-1|0|1}. For CS:GO only. (optional)
is_souvenir
{-1|0|1}. For CS:GO only. (optional)
per_page
Results per page (between 24 and 480). (optional)

Example Request

          
https://bitskins.com/api/v1/get_inventory_on_sale/?api_key=API_KEY&code=CODE&page=PAGE&app_id=APP_ID&sort_by=SORT_BY&order=ORDER&market_hash_name=MARKET_HASH_NAME&min_price=MIN_PRICE&max_price=MAX_PRICE&has_stickers=HAS_STICKERS&is_stattrak=IS_STATTRAK&is_souvenir=IS_SOUVENIR&per_page=PER_PAGE
           
        

Get Specific Items on Sale

Allows you to retrieve data for specific Item IDs that are currently on sale. To gather Item IDs you wish to track/query, see the 'Get Inventory on Sale' API call for items currently on sale.

Endpoint
/api/v1/get_specific_items_on_sale

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
item_ids
Upto 250 comma-delimited item IDs.
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_specific_items_on_sale/?api_key=API_KEY&code=CODE&item_ids=ITEM_IDS&app_id=APP_ID
           
        

Get Reset-Price Items

Returns a paginated list of items that need their prices reset. Items need prices reset when Steam changes tracker so we are unable to match specified prices to the received items when you list them for sale. Upto 24 items per page. Items that need price resets always have the reserved price of 4985.11.

Endpoint
/api/v1/get_reset_price_items

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
page
Page number. (optional)
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_reset_price_items/?api_key=API_KEY&code=CODE&page=PAGE&app_id=APP_ID
           
        

Get Money Events

Allows you to retrieve historical events that caused changes in your balance. Upto 24 items per page.

Endpoint
/api/v1/get_money_events

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
page
Page number. (optional)

Example Request

          
https://bitskins.com/api/v1/get_money_events/?api_key=API_KEY&code=CODE&page=PAGE
           
        

Money Withdrawal

Allows you to request withdrawal of available balance on your BitSkins account. All withdrawals are finalized 15 days after this request on a rolling basis.

Multiple simultaneous calls to this method may result in 'Failed to acquire lock' errors.

Endpoint
/api/v1/request_withdrawal

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
amount
Amount in USD to withdraw. Must be at most equal to available balance, and over $5.00 USD.
withdrawal_method
Can be bitcoin, paypal, or bank wire.

Example Request

          
https://bitskins.com/api/v1/request_withdrawal/?api_key=API_KEY&code=CODE&amount=AMOUNT&withdrawal_method=WITHDRAWAL_METHOD
           
        

Buy Item

Allows you to buy the item currently on sale on BitSkins. Item must not be currently be on sale to you. Requires 2FA (Secure Purchases) to be enabled on your account if not logged in.

Multiple simultaneous calls to this method may result in 'Failed to acquire lock' errors.

Endpoint
/api/v1/buy_item

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
item_ids
Comma-separated list of item IDs.
prices
Comma-delimited prices at which you want to make the purchase. Important to specify this in case the prices change by the time you make this call.
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/buy_item/?api_key=API_KEY&code=CODE&item_ids=ITEM_IDS&prices=PRICES&app_id=APP_ID
           
        

Sell Item

Allows you to list an item for sale. This item comes from your Steam inventory. If successful, our bots will ask you to trade in the item you want listed for sale.

Endpoint
/api/v1/list_item_for_sale

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
item_ids
Comma-separated list of item IDs from your Steam inventory.
prices
Comma-separated list of prices for each item ID you want to list for sale (order is respective to order of item_ids).
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/list_item_for_sale/?api_key=API_KEY&code=CODE&item_ids=ITEM_IDS&prices=PRICES&app_id=APP_ID
           
        

Modify Sale

Allows you to change the price on an item currently on sale.

Endpoint
/api/v1/modify_sale_item

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
item_ids
Item IDs to modify.
prices
New item prices, comma-delimited, in order of item_ids.
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/modify_sale_item/?api_key=API_KEY&code=CODE&item_ids=ITEM_IDS&prices=PRICES&app_id=APP_ID
           
        

Withdraw Item

Allows you to delist an active sale item and/or re-attempt an item pending withdrawal.

Endpoint
/api/v1/withdraw_item

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
item_ids
Comma-separated list of item IDs.
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/withdraw_item/?api_key=API_KEY&code=CODE&item_ids=ITEM_IDS&app_id=APP_ID
           
        

Bump Item

Allows you to bump items higher for $0.75. Must have 2FA enabled if not logged in.

Multiple simultaneous calls to this method may result in 'Failed to acquire lock' errors.

Endpoint
/api/v1/bump_item

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
item_ids
Item IDs to bump, comma-delimited.
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/bump_item/?api_key=API_KEY&code=CODE&item_ids=ITEM_IDS&app_id=APP_ID
           
        

Get Buy History

Allows you to retrieve your history of bought items on BitSkins. Defaults to 24 items per page, with most recent appearing first.

Endpoint
/api/v1/get_buy_history

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
page
Page number. (optional)
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_buy_history/?api_key=API_KEY&code=CODE&page=PAGE&app_id=APP_ID
           
        

Get Sell History

Allows you to retrieve your history of sold items on BitSkins. Defaults to 24 items per page, with most recent appearing first.

Endpoint
/api/v1/get_sell_history

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
page
Page number. (optional)
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_sell_history/?api_key=API_KEY&code=CODE&page=PAGE&app_id=APP_ID
           
        

Get Item History

Allows you to retrieve bought/sold/listed item history. By default, upto 24 items per page, and optionally up to 480 items per page.

Endpoint
/api/v1/get_item_history

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
page
Page number. (optional)
names
Delimited item names (optional)
delimiter
Can be , ; ;END; !END! (optional)
per_page
Results per page (between 24 and 480). (optional)
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_item_history/?api_key=API_KEY&code=CODE&page=PAGE&names=NAMES&delimiter=DELIMITER&per_page=PER_PAGE&app_id=APP_ID
           
        

Get Trade Details

Allows you to retrieve information about items requested/sent in a given trade from BitSkins. Trade details will be unretrievable 7 days after the initiation of the trade.

Endpoint
/api/v1/get_trade_details

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
trade_token
The trade token in the Steam trade's message.
trade_id
The trade ID in the Steam trade's message.

Example Request

          
https://bitskins.com/api/v1/get_trade_details/?api_key=API_KEY&code=CODE&trade_token=TRADE_TOKEN&trade_id=TRADE_ID
           
        

Get Recent Trade Offers

Allows you to retrieve information about 50 most recent trade offers sent by BitSkins. Response contains 'steam_trade_offer_state,' which is '2' if the only is currently active.

Endpoint
/api/v1/get_recent_trade_offers

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
active_only
Value is 'true' if you only need trade offers currently active. (optional)

Example Request

          
https://bitskins.com/api/v1/get_recent_trade_offers/?api_key=API_KEY&code=CODE&active_only=ACTIVE_ONLY
           
        

Get Recent Sale Info

Allows you to retrieve upto 5 pages worth of recent sale data for a given item name. These are the recent sales for the given item at BitSkins, in descending order.

Endpoint
/api/v1/get_sales_info

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
market_hash_name
The item's name.
page
The page number. (optional)
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_sales_info/?api_key=API_KEY&code=CODE&market_hash_name=MARKET_HASH_NAME&page=PAGE&app_id=APP_ID
           
        

Get Raw Price Data

Allows you to retrieve raw Steam Community Market price data for a given item. You can use this data to create your own pricing algorithm if you need it.

Endpoint
/api/v1/get_steam_price_data

Request Parameters

api_key
Your API Key as a string.
code
Two-factor authentication code.
market_hash_name
The item's name.
app_id
The app_id for the inventory's game (defaults to CS:GO if not specified). (optional)

Example Request

          
https://bitskins.com/api/v1/get_steam_price_data/?api_key=API_KEY&code=CODE&market_hash_name=MARKET_HASH_NAME&app_id=APP_ID