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
	
      

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.

Example Request

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

Get Market Data

Allows you to retrieve basic price data for upto 250 market_hash_names from BitSkins at a time. This data is only for items currently on sale. Please make sure to URI encode your items' names. Byte encodings will be rejected.

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.
names
Comma-delimited market_hash_name values for the items.

Example Request

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

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)

Example Request

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

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). Upto 24 items per page. This method allows you to search the inventory just as the search function on the website allows you to search inventory.

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)
sort_by
{created_at|price|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} (optional)
is_stattrak
{-1|0|1} (optional)
is_souvenir
{-1|0|1} (optional)

Example Request

          
https://bitskins.com/api/v1/get_inventory_on_sale/?api_key=API_KEY&code=CODE&page=PAGE&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
           
        

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)

Example Request

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

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.

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.

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.

Example Request

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

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).

Example Request

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

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.

Example Request

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

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.

Example Request

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

Bump Item

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

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.

Example Request

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

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)

Example Request

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

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)

Example Request

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

Get Item History

Allows you to retrieve bought/sold/listed item history. Upto 24 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)

Example Request

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

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 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 name
page
The page number. (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