API Interface: ISales

API overview

Method: GetSales v1

HTTP method: GET
https://api.opskins.com/ISales/GetSales/v1/

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.

Input

Output

response is an array of sale objects, containing these properties:

Errors

json error output:

{
  "status": 2004,
  "message": "No matching sales were found on your account.",
  "current_page": 1,
  "total_pages": 1
}

Method: GetListingLimit v1

HTTP method: GET
https://api.opskins.com/ISales/GetListingLimit/v1/

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

Input

none

Output

Method: ListItems v1

HTTP method: POST
https://api.opskins.com/ISales/ListItems/v1/

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

Output

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."
}

Method: EditPrice v1

HTTP method: POST
https://api.opskins.com/ISales/EditPrice/v1/

Edits the price of an item you currently have listed. If the item is in your OPSkins inventory, it lists it for sale.

Input

Output

Errors

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_EXCEEDED

Method: EditPriceMulti v1

HTTP method: POST
https://api.opskins.com/ISales/EditPriceMulti/v1/

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

Output

none

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"
}

Method: BumpItems v1

HTTP method: POST
https://api.opskins.com/ISales/BumpItems/v1/

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

Output

Errors

json error response BAD_INPUT

{
  "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"
}

Method: ReturnItems v1

HTTP method: POST
https://api.opskins.com/ISales/ReturnItems/v1/

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

Output

Errors

json error response STEAM_UNAVAILABLE

{
  "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."
}

Method: GetActiveTradeOffers v1

HTTP method: GET
https://api.opskins.com/ISales/GetActiveTradeOffers/v1/

Get the list of active trade offers which our bots have sent you.

Input

none

Output

Method: Search v1

HTTP method: GET
https://api.opskins.com/ISales/Search/v1/

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.

Input

Output

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."
}

Method: BuyItems v1

HTTP method: POST
https://api.opskins.com/ISales/BuyItems/v1/

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

Output

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."
}

Method: GetLastSales v1

HTTP method: GET
https://api.opskins.com/ISales/GetLastSales/v1/

Get data about the most recent sales for a given item.

Input

Output

The response of this method is an array of objects, where each object has these properties:

Method: GetSaleStatuses v1

HTTP method: GET
https://api.opskins.com/ISales/GetSaleStatuses/v1/

Returns a list of possible sale states and localized strings that go with them.

Input

none

Output

This article has been viewed 25,744 times.