opskins-api v1.0.22
npm i opskins-api
const OPSkins = new (require('opskins-api'))(your OPSkins API Key)
For more help and documentation regarding the OPSkins API, visit their official API docs
Please note that every method in this module returns a promise!
Cashout
!! These methods are used accessing the 'Cashout' property !!
Example:
OPSkins.Cashout.GetAddress('paypal').then(data => {
});GetAddress(string processor)
Input:
processorThe processor you need the address for
Processor can be:
- paypal
- bitcoin
skrill
Output:
processor_nameThe name of the processor, as a stringaddressYour saved address, or null if not yet savedtimestampThe Unix timestamp of when you saved this address, or null if not yet savedcan_changeA boolean indicating whether you can change this address by calling SetAddress again right nowchange_requires_twofactorA boolean indicating whether you will need to provide a two-factor code to change this address
GetPendingCashouts()
Output:
cashoutsAn array of objects, each of which represents a cashout and has these properties:idThe cashout IDamountThe amount to be cashed out, in USD centsaddressThe address to which the cashout will be senttimestampA Unix timestamp representing when this cashout was requestedprocessorThe ID of the processor which this cashout will be sent viapriorityA boolean indicating whether this is a priority cashout (which will incur extra fees)
CancelPendingCashout(int cashoutId)
Input:
cashoutidThe id of the cashout to cancel
Outputs nothing
GetBitcoinInstantCashoutRate()
Output:
usd_rateThe price per 1 BTC, in USD (dollars, not cents)
RequestPayPal(int amount, int priority)
Input:
amountis in USD cents.priorityoptional, 0 by default. Pass1if you want this to be a priority cashout (incurs extra 5% fee). Leave blank if you want a regular cashout
Output:
addressThe email address to which the cashout will be sentcashoutidThe ID of the newly-created cashout requestpriorityA boolean indicating whether this cashout request is for a priority cashout
RequestBitcoin(int amount, int priority)
Input:
amountis in USD cents.priorityoptional, 0 by default. Pass1if you want this to be a priority cashout (incurs extra 5% fee). Leave blank if you want a regular cashout
Output:
addressThe Bitcoin address where this cashout will be sentcashoutidThe ID of the newly-created cashout requestpriorityA boolean indicating whether this cashout request is for a priority/instant cashoutbitcoin_txn_idOnly present if this was an instant cashout. This is the Bitcoin transaction ID (which is a hex-string hash) which was just paid to youbitcoin_amount_satoshisOnly present if this was an instant cashout. This is the amount of BTC you received, in satoshis (0.00000001 BTC)
RequestSkrill(int amount)
Input:
amountis in USD cents.
Output:
addressThe email address where the payment was sentcashoutidThe ID of the newly-created (and paid) cashout requestskrill_txn_idThe ID of the Skrill payment transactionskrill_txn_statusAn integer representing the status of the Skrill payment transaction (see Skrill's documentation)skrill_txn_status_msgA string representing the status of the Skrill payment transaction (see Skrill's documentation)
GetCashoutableBalance()
Output:
total_balanceYour total (spendable) account balance, in USD centspending_cashout_balanceThe sum of all your pending cashouts, in USD centsdeposited_balanceHow much of your balance was deposited through a payment provider, in USD cents. This amount cannot be cashed out.cashoutable_balanceThe total amount of money you have that can be cashed out, in USD cents. This is yourtotal_balanceminus yourpending_cashout_balanceand yourdeposited_balance
Inventory
!! These methods are used accessing the 'Inventory' property !!
Example:
OPSkins.Inventory.GetInventory(0).then(data => {
console.log(data);
});GetInventory(int page, int per_page)
Input:
pagestarts at 0per_pageis optional, and defaults to 10,000
Output:
limitsAn object whose keys represent an application id730- Steam Application ID. In this case, CS:GO. This key is dynamic and based off of which games we currently restrict inventory sizes for.
free_slots- How many slots are available in your On-Site Inventory for this gameitemsAn array of []standard sale objects](https://opskins.com/kb/api-sale-objects), which also additionally have the following propertiesid_parentThe OPSkins ID of the item you purchased which created this item. For example, if you bought item #12345 and ended up with item #23456 in your OPSkins inventory, thenidwill be 23456 andid_parentwill be 12345.added_timeThe Unix timestamp for when this item was added to your OPSkins inventoryoffer_idIf there is an outstanding withdrawal trade offer for this item, this is its ID. If not, this is null. If you have requested a trade offer that couldn't be sent immediately but is queued to be sent in the future, this is 0.offer_declinedIf there was previously a withdrawal trade offer for this item but it was declined, this is true.offer_untradableIf we previously attempted to send a withdrawal trade offer for this item but we were unable to due to a bad trade URL or another trading restriction (e.g. Steam Guard), this is true.requires_supportIf this item has a problem and requires support intervention before it can be withdrawn or relisted, this is true.can_repairIf this item requires support but you can attempt to self-repair it, this is true.
Withdraw(string items)
Input:
itemsarray of item IDs. Must be items in your OPSkins inventory that do not have an outstanding trade offer and do not require support.
Output:
offersAn array of objects (one per bot), each with the following structure:bot_idThe internal ID of the bot which sent (or tried to send) the trade offertradeoffer_idIf we were able to successfully send a trade offer, this is its ID. If error, this is null.tradeoffer_errorIf we were not able to send a trade offer, this is a string containing an error message. If no error, this is null.itemsAn array of OPSkins item IDs in this trade offer
Deposit(string items)
Add between 1 and 50 items (upper cap subject to change) to your On-Site Inventory. This will fail if any of the items passed in already have sales with active trade offers out. If there's a matching sale for an item that doesn't have a trade offer out, it will automatically be deleted. This works identically to ISales/ListItems/v1 minus the price and addons parameters.
Input:
itemsA JSON-encoded array of objects. One object for each item you wish to list. Each object should contain these properties:appidThe Steam AppID of the game which owns this item (e.g. 730 for CS:GO, 440 for TF2, 570 for Dota 2)contextidThe Steam context ID which contains this item (2 for Valve games, 6 for Steam Community items, 1 for H1Z1, etc.). When you right-click on an item in your Steam inventory and copy its URL, the context ID is the second number after the hash.assetidThe Steam asset ID of the item. This is also known as just the item's id
Output:
tradeoffer_idIf a trade offer was successfully sent, this is its ID as a string. If we weren't able to send a trade offer, this isnulltradeoffer_errorIf we weren't able to send a trade offer, this is an error message string. If there was no error, this isnullbot_idThe internal OPSkins ID of the storage account to which these sales were assigned.bot_id64The 64-bit SteamID of the storage account to which these sales were assigned. This is the account that's sending a trade offer.security_tokenThe 6-character security token that is included in the trade offer message.salesAn array containing objects describing the sales that were created. Each object has these properties:saleidThe OPSkins internal ID of this saleappidThe Steam AppID for this itemcontextidThe Steam context ID in which this item resides in your inventoryassetidThe current asset ID of this item in your inventorymarket_nameThe name of this itempriceThe list price of this item in USD cents (typically set to $99,999.99)addonsAn array containing strings for each addon this item has
Pricing
!! These methods are used accessing the 'Pricing' property !!
Example:
OPSkins.Pricing.GetPriceList(730).then(data => {
console.log(data);
});GetPriceList(int appid)
Input:
appidThe Steam application ID of the app you want prices for. For example, 730 for CS:GO, 440 for TF2, or 753 for Steam.
Output:
response is an object whose keys are item names. Values of those keys are objects whose keys are dates in YYYY-MM-DD format, and the value of those keys are objects which contain several properties describing the item's sale price on that day. Prices are in USD cents (formerly known as OP). The properties are:
- mean
- min
- max
- normalized_mean
- normalized_min
- normalized_max
- std_dev
The output of this method is cached by OPSkins' CDN. Therefore, the timestamp is most likely not going to be accurate. This list updates nightly at or around midnight server time (Eastern United States timezone).
GetAllLowestListPrices(int appid)
Input:
appidThe Steam application ID of the app you want prices for. For example, 730 for CS:GO, 440 for TF2, or 753 for Steam.
Output:
response is an object whose keys are item names. Values of those keys are objects which have the following keys:
priceThe lowest available list price for that item, in USD centsquantityThe total amount of that item we have on sale, for any price
The proper way to interpret an entry is "quantity currently on sale, starting at price".
GetSuggestedPrices(int appid)
Input:
appidThe Steam application ID of the app you want prices for. For example, 730 for CS:GO, 440 for TF2, or 753 for Steam.
Output:
response is an object whose keys are item names. Prices are in USD cents (formerly known as OP). The properties are:
- op_7_day
op_30_day
Sales
!! These methods are used accessing the 'Sales' property !!
Example:
OPSkins.Sales.GetSales({type: 2, appid: 730).then(data => {
console.log(data);
});GetSales(object options)
Gets a list of item sales for your account. This endpoint is paginated, and will return up to per_page (Default: 10,000) results per page.
Because options can contain a bunch of optional parameters, it is an object, pass it as such:
{
type: 2,
page: 2,
sort: 'new'
}Input:
typeOptional. If provided, limit results to sales in this status. If not provided, return all sale statuses.- 1 Awaiting pickup; you created a listing but haven't deposited the item yet. The item may also be in a trade hold or trade locked.
- 2 On sale
- 3 Sold, but not delivered to the buyer yet
- 4 Sold and delivered. You have been paid at this point.
- 5 You requested that the item be returned, but it hasn't been delivered to you yet.
- 6 The item has been returned to your account.
appidOptional. If provided, limit results to sales for this Steam AppID. If not provided, return all apps.after_saleidOptional. If provided, limit results to sales with IDs greater than this.pageOptional. Page number to request. Defaults to 1.per_pageOptional. Number of items per page to return. Defaults to 10000. If you pass a value larger than 10,000, then it will be capped to 10,000.sortOptional. Sorts the results by the chosen sort type. If not provided, returns results by ascending sale ID.new- Sorts by newest created sales first.oldest_bump- Sorts by oldest bumped sales firstlast_sold- Sorts by the last sold sales firstprice_desc- Sorts by highest to lowest priceprice_asc- Sorts by lowest to highest pricealpha- Sorts by item names alphabeticallybot- Sorts by bot ID in ascending orderactivity_old- Sorts by last_updated in ascending orderactivity_new- Sorts by last_updated in descending order
Output:
response is an array of sale objects, containing these properties:
idThe sale ID of the itempriceThe sale price of the item, in USD centscommissionIf the item is sold, how much commission OPSkins took, in USD cents. If not sold, nulltaxIf the item is sold, how much tax was taken, in USD cents. If not sold, nullclassidThe Steam class ID of the iteminstanceidThe Steam instance ID of the itemappidThe AppID of the game to which this item belongscontextidThe Steam context ID to which this item belongsassetidIf the item is currently on the bot or awaiting pickup, its Steam asset IDnameThe name of the itembotThe internal ID of the bot to which this item is assignedbot_id64The 64-bit SteamID of the bot to which this item is assignedofferidThe ID of the trade offer in which this item is being picked up or returned. null if the item is sold. There are some special values that have certain meaning.- A trade offer has been queued for this item, but hasn't been sent yet
- There is no trade offer active for this item, but you could request one to be sent
- We couldn't send you a trade offer because you currently can't trade. Request a trade to be sent once you can trade.
- We sent you a trade offer, but you declined or countered it. You can request a new trade to be sent.
- We tried to send you a trade offer, but your Trade URL was wrong or your inventory is full. You can request a new trade to be sent once you've fixed it.
- There was an unknown error when we were trying to send the trade offer. You can try to repair the sale, or contact support for assistance.
- When we tried to send the trade offer, Steam reported that the item no longer exists. You can try to repair the sale, or contact support for assistance.
stateAn integer representing what state this item is in- Awaiting pickup; you created a listing but haven't deposited the item yet. The item may also be in a trade hold or trade locked.
- On sale
- Sold, but not delivered to the buyer yet
- Sold and delivered. You have been paid at this point.
- You requested that the item be returned, but it hasn't been delivered to you yet.
- The item has been returned to your account.
escrow_end_dateA Unix timestamp representing when the item will come out of a Steam trade hold. If trade_locked is set, then this is the date when the item will come out of its trade lock.list_timeA Unix timestamp representing when the item was listed (or deposited, if it's been deposited)bump_timeA Unix timestamp representing when the item was last bumpedlast_updatedA Unix timestamp representing when the item last changed state, or had its price edited. May be 0 for older sales.security_tokenThe security token that the bot will send in the trade offer.wearThe item's wear, as a float. null if unknown or not applicable.txidIf the item was sold and delivered, this is the transaction ID in which you got paid.trade_lockedThis will be true if the item is currently trade locked (H1Z1).repair_attemptedThis will be true if the item is in an errored state, and a repair has been attempted and failed.addonsAn array containing strings for addons that are applied to this item.featured- The item has been featuredprivate- The item has been listed privatelyscreenshots- The item has an Instant Field Inspection
GetListingLimit()
Get the current limit of how many items you can list for sale in one request. This limit is subject to change periodically (usually it only goes up, but it is possible that we may need to decrease it at some point). This is not an account-based listing limit; this is only a limit on how many items can be listed in one sale queue (via the website) or one call to ListItems (via the API).
Output:
listing_limitThe current listing limit
ListItems(array items)
Lists between 1 and 50 items for sale (upper cap subject to change). This will fail if any of the items passed in already have sales with active trade offers out. If there's a matching sale for an item that doesn't have a trade offer out, it will automatically be deleted.
Input:
itemsA JSON-encoded array of objects. One object for each item you wish to list. Each object should contain these properties:appidThe Steam AppID of the game which owns this item (e.g. 730 for CS:GO, 440 for TF2, 570 for Dota 2)contextidThe Steam context ID which contains this item (2 for Valve games, 6 for Steam Community items, 1 for H1Z1, etc.). When you right-click on an item in your Steam inventory and copy its URL, the context ID is the second number after the hash.assetidThe Steam asset ID of the item. This is also known as just the item'sidpriceThe desired list price for this item, before commission. Pass this in USD cents (formerly known as OP). For example, $20.00 is 2000.addonsAn array of strings (possible addon strings are listed below)featured- Feature this item (costs $3.00 if you don't have a free featured credit available)screenshots- Inspectable CS:GO items only: take screenshots of this item and display them (Instant Field Inspection). Costs 2% of list price, minimum $0.50. If you also feature this item, then the total cost of both addons is capped to $4.50.
Output:
tradeoffer_idIf a trade offer was successfully sent, this is its ID as a string. If we weren't able to send a trade offer, this isnulltradeoffer_errorIf we weren't able to send a trade offer, this is an error message string. If there was no error, this isnullbot_idThe internal OPSkins ID of the storage account to which these sales were assigned.bot_id64The 64-bit SteamID of the storage account to which these sales were assigned. This is the account that's sending a trade offer.security_tokenThe 6-character security token that is included in the trade offer message.salesAn array containing objects describing the sales that were created. Each object has these properties:saleidThe OPSkins internal ID of this saleappidThe Steam AppID for this itemcontextidThe Steam context ID in which this item resides in your inventoryassetidThe current asset ID of this item in your inventorymarket_nameThe name of this itempriceThe list price of this item in USD centsaddonsAn array containing strings for each addon this item has
#Errors
json error BAD_INPUT:
{
"status": 3000,
"message": "'items' must be a JSON array of objects"
}json error ACCESS_DENIED:
{
"status": 1002,
"message": "You may not list items for sale while you are under the age of 18."
}json error GENERIC_USER_ACCOUNT_ERROR:
{
"status": 1000,
"message": "Please go to your account page and set your Trade URL before attempting to list items."
}
EditPrice(int saleid, int price)
Edits the price of an item you currently have listed. If the item is in your OPSkins inventory, it lists it for sale.
Input:
saleidThe ID of the sale/item you want to edit the price for (must be yours)priceThe new price for your item, in USD cents. For example, to list an item for $4.00, use400
Output:
relistedtrue if the item was in your OPSkins inventory and has been re-listed, or false if it was already listed and its price has simply been edited.
Errors
NOT_FOUNDThe requested sale ID does not exist or doesn't belong to youBAD_STATEThe requested sale ID is not currently on sale or in your OPSkins inventory, or it's in a bad state that requires support intervention or repairUNACCEPTABLE_PRICEYour requested price is outside the acceptable range for all items, or the item has pricing restrictions on it and your price violates those restrictionsALREADY_IN_THAT_STATEThe item is already for sale for the requested priceSTEAM_UNAVAILABLEWhen you re-list an inventory item, we grab the Steam inventory to make sure it's still there. If you're re-listing and Steam inventories are down, you get this error code.RATE_LIMIT_EXCEEDEDYou can only edit the price of an item 10 times per day. You'll get this code if you try to edit it more than that many times.
json error if no matching sale was found
{
"status": 2002,
"message": "No matching sale was found."
}Other possible error responses with corresponding status codes:
2002 NOT_FOUND
2003 BAD_STATE
3003 UNACCEPTABLE_PRICE
2012 ALREADY_IN_THAT_STATE
4000 STEAM_UNAVAILABLE
3008 RATE_LIMIT_EXCEEDEDEditPriceMulti(object items)
Queue price updates for up to 500 items. On success, this method will return an HTTP 202 Accepted status code and will respond immediately. The actual price updates will be queued and will be processed in the background. This will fail if you attempt to queue a price update for an item which already has a queued price update. Price update errors will not be reported and will be silently dropped in the background. For example, requests to edit the prices of items you do not own or which do not exist will be accepted, but will not actually be processed.
Input:
itemsAnd object where the keys are the OPSkins sale IDs and the values are new prices in USD cents.
Example:
OPSkins.Sales.EditPriceMulti({ 1000: 500 });Outputs nothing
Errors
json error response RATE_LIMIT_EXCEEDED
{
"status": 3008,
"message": "Another EditPriceMulti request is currently processing. Please wait for it to be accepted."
}json error response BAD_INPUT
{
"status": 3000,
"message": "\"items\" must be in format items[itemid]=price"
}json error response BAD_STATE
{
"status": 2003,
"message": "Item 1000 already has a price update queued. Its new price will be 1000"
}BumpItems(array items)
Bump one or more items you've listed for sale to the top of the browse page and the featured (default) sort for search. Will cost $0.50 per item, but will use any free bump credits you may have (e.g. from a premium membership) first.
It is possible for bumping to fail for some items in this batch and to succeed for others.
The top-level balance property will be present in this method's response, containing your up-to-date account balance.
Input:
itemsAn array of sale IDs of items you want to bump
Output:
salesAn object whose keys are sale IDs and values are objects of the following structure:statusAn ErrorCode value representing the status of the bump request for this item. Will be 1 (OK) on success.messageA string containing an error message, or "OK" on success.
#Errors
{
"status": 3000,
"message": "No sale IDs supplied"
}json error response BAD_INPUT
{
"status": 3000,
"message": "Invalid input; items must be a comma-separated list of sale IDs"
}json error response BAD_INPUT
{
"status": 3000,
"message": "300 sale IDs supplied; only up to 100 may be supplied at one time"
}json error response GENERIC_INTERNAL_ERROR
{
"status": 2000,
"message": "An unknown error occurred"
}ReturnItems(array items)
Return one or more items you've listed for sale to your Steam accounts. Input items must be either on sale or awaiting return, and must not have an active trade offer out or queued. Under most circumstances, a trade offer won't be queued, but it's possible if, for example, you request that an item be returned and the bot is offline at the time of request.
This will (attempt to) send trade offers for all items in your input. If multiple trade offers must be sent, they will be sent in series. Therefore, you may wish to call this method separately for each bot that will be sending an offer (you can use GetSales to find out which bot is holding which item).
If the status is not OK (1), the output will still be defined (if your input was well-formed, there were no unexpected internal errors, and Steam is not completely down) in the event that the failure was due to Steam (e.g. bad trade URL, item doesn't exist anymore, trade server down).
Input:
itemsAn array of sale IDs of items you want returned
Output:
offersAn array of objects, where each object in this array represents one trade offer that we sent (or tried to send)bot_idThe internal ID of the bot that sent (or tried to send) this trade offeritemsAn array of sale IDs which were in this offertradeoffer_idIf the offer was successfully sent, this is its trade offer ID as a string.nullon failuretradeoffer_errorIf the offer couldn't be sent, this is an error message.nullon success
#Errors
{
"status": 4000,
"message": "Steam servers are currently unavailable. Please try again later."
}json error response BAD_INPUT
{
"status": 3000,
"message": "Bad input for items"
}json error response NOT_FOUND
{
"status": 2002,
"message": "One or more input items were not found."
}json error response NOT_FOUND
{
"status": 2002,
"message": "No matching sale was found for ID ..."
}json error response BAD_STATE
{
"status": 2003,
"message": "Sale ID ... is not in a returnable state."
}json error response BAD_STATE
{
"status": 2003,
"message": "There was a problem with sale ID ... . Please contact support to resolve this issue."
}json error response STEAM_OFFER_FAILURE
{
"status": 4004,
"message": "There was a problem sending some of your trade offers. Please try again later."
}GetActiveTradeOffers()
Get the list of active trade offers which our bots have sent you.
Output:
offersAn object whose keys are Steam trade offer IDs, and values are objects each with this structure:saleidsAn array containing the OPSkins sale IDs of the items in this offerbot_idThe internal OPSkins ID of the bot which sent this tradebot_id64The 64-bit SteamID of the bot which sent this tradetypeA string, which may be one of pickup, return, or withdrawal
Search(string app, optional string search_item, optional float min, optional float max )
Search active OPSkins listings for particular items. This endpoint is relatively heavily rate-limited. Currently, it is limited to 20 requests per minute. To prevent bot sniping, this endpoint will only return listings which have been publicly visible for at least ten minutes, and are not currently limited to Buyers Club members. This endpoint always returns 100 listings sorted from lowest to highest price.
Input is identical to that of the main site's search page. The most important parameters are listed here.
appRequired. This is the appid_contextid pair for the app you wish to search. For example, use730_2to search CS:GO listings.search_itemOptional. This is the search term which will be matched to item names. This uses fuzzy matching by default. Wrap your term in quotes to only return exact matches. For example, to find items containing the exact string "case key" (case-insensitive), then this value should be"case key".minOptional. The minimum item price to return, in USD. Note that this is different from most other currency displays which use USD cents. For example, pass0.5here to only search for items priced at $0.50 and up.maxOptional. The maximum item price to return, in USD.
Output:
salesAn array of objects containing the results of your search query. Each object has these properties:idThe item's OPSkins sale IDamountThe item's list price, in USD centsclassidThe item's Steam classid at time of pickup (may have changed in trade)instanceidThe item's Steam instanceid at time of pickup (may have changed in trade)imgThe item's Steam image URL (append this to https://steamcommunity-a.akamaihd.net/economy/image/)market_nameThe item's nameinspectThe full URL to inspect this item, if applicable. If not, then this is nulltypeThe item's "type" as reported by Steam (e.g. Base Grade Key)item_idThe item's Steam asset ID on our storage accountstickersA string containing the stickers applied to this item, as comma-separated pairs of stickerid,wearwearThe item's floating-point wear value, between 0 and 1 if applicable. If not applicable or unknown, then nullappidThe item's Steam appIDcontextidThe item's Steam context IDbot_idThe internal OPSkins ID of the bot which is holding this item
Errors:
json error response RATE_LIMIT_EXCEEDED
{
"status": 3008,
"message": "You already have a search request pending. Please wait for it to finish."
}json error response NOT_LOGGED_IN
{
"status": 1003,
"message": "Please log in to view more results."
}json error response ACCESS_DENIED
{
"status": 1002,
"message": "Please increase your Steam profile level to :min_buy_level to view more results."
}BuyItems(array saleids, int total)
Purchase one or more items and deliver them to your OPSkins inventory. Once purchased, the item(s) can be delivered to your Steam inventory using IInventory/Withdraw. To prevent bot sniping, this endpoint will only purchase listings which have been publicly visible for at least ten minutes, and are not currently limited to Buyers Club members.
If this request succeeds, then it will contain a root-level balance property containing your new account balance after the purchase, in USD cents.
Input:
saleidsAn array of sale IDs for the items you wish to purchase. 300 maximum.totalThe total cost of these items, in USD cents. For example, if you are purchasing a $2 item and a $1.23 item, then this should be 323. The request will fail if this does not match the actual total.
Output:
itemsAn array of objects for the items you purchased. Each object has these properties:saleidThe OPSkins sale ID of the item. This will be one of the IDs you passed in your request.new_itemidThe new OPSkins ID of the item in your OPSkins inventory. This is the ID you will pass to Withdraw in order to withdraw the item to your Steam inventory. This will become the item's sale ID if you choose to re-list it.nameThe name of the itembot_idThe internal OPSkins ID of the bot which is holding this item
#Errors
json error response STEAM_UNAVAILABLE
{
"status": 4000,
"message": "Steam servers are currently unavailable"
}json error response BAD_INPUT
{
"status": 3000,
"message": "Duplicate sale ID ..."
}json error response BAD_INPUT
{
"status": 3000,
"message": "Non-numeric sale ID ..."
}json error response RATE_LIMIT_EXCEEDED
{
"status": 3008,
"message": "Maximum of 300 items in request exceeded"
}json error response RATE_LIMIT_EXCEEDED
{
"status": 3008,
"message": "You must wait until your previous purchase attempt completes"
}json error response NOT_FOUND
{
"status": 2002,
"message": "Invalid sale ID provided"
}json error response BAD_STATE
{
"status": 2003,
"message": "Expected total ... does not match actual total ..."
}json error response UNACCEPTABLE_ITEM
{
"status": 3001,
"message": "Sale ... cannot be purchased as it is currently restricted to Buyers Club members."
}json error response NOT_ENOUGH_COINS
{
"status": 1001,
"message": "You do not have enough wallet funds to complete this transaction."
}json error response BAD_STATE
{
"status": 2003,
"message": "Sale ... is no longer available for purchase."
}json error response GENERIC_INTERNAL_ERROR
{
"status": 2000,
"message": "An unknown error occurred."
}GetLastSales(int appid, int contextid, string market_name, optional string val_1)
Get data about the most recent sales for a given item.
Input:
appidThe Steam AppID of the game which owns the item you're interested incontextidThe Steam context ID for the item you're interested inmarket_nameThe full market name of the item you're interested in, for example: "AK-47 | Aquamarine Revenge (Field-Tested)"val_1If you're interested in a particular variant of the item, this is its unusual effect index (for TF2) or pattern/paint index (for CS:GO)
Output:
The response of this method is an array of objects, where each object has these properties:
idThe sale ID of the item that soldamountThe amount the item sold for, in USD centswearThe item's wear as a float, or null if unknown or not applicabletimestampThe Unix timestamp of when this item sold
GetSaleStatuses()
Output:
statusesAn array containing objects, where each object has the following propertieskeyThe integer code that corresponds to this sale statenameThe localized string that corresponds to this sale state
Status
!! These methods are used accessing the 'Status' property !!
Example:
OPSkins.Status.GetBotList().then(data => {
console.log(data);
});GetSaleStatuses()
Retrieves a listing of all active OPSkins bots, namely their internal IDs (the number in their Steam name), their SteamIDs, and their online status.
You may wish to note that some internal IDs have either been skipped or retired, so this list is not exactly sequential.
Output:
botsAn object whose keys are internal bot IDs and values are objects with this structure:idThe bot's internal IDid64The bot's 64-bit SteamID as a stringonlineA boolean indicating whether this bot is currently online and available for trading
Support
!! These methods are used accessing the 'Support' property !!
Example:
OPSkins.Support.RepairItem(1337).then(data => {
console.log(data);
});RepairItem(int saleid)
Input:
saleid- The ID of the sale (or on-site inventory item) that you want to attempt to repair
Output:
type- A string representing what type of item this is in your accountsalefor an item you're sellingpurchasefor an item you purchaseditemfor an item in your OPSkins inventory
bot- The ID of the bot which owns this itemrepairedSaleids- An array containing the IDs of other items on this bot which are also repaired (will contain the passed-in ID if it was repaired). Some or all of these may not belong to you.repaired- 1 if the passed-in ID was repaired, 0 if it wasn't. You'll need to contact support if it's 0. Will also be 1 if the passed-in ID was not in a bad state to begin with.
User
!! These methods are used accessing the 'User' property !!
Example:
OPSkins.User.GetBalance().then(data => {
console.log(data);
});GetBalance()
Used to get the current balance of your OPSkins account.
Output:
None beyond the standard balance property, as defined in the API overview.
SaveTradeURL(string trade_url)
Update your account's trade URL.
Input:
trade_urlYour new trade URL. Must be for the Steam account linked with this OPSkins account, or else will be rejected.
Outputs nothing
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago