NAV Navigation
Shell NodeJS Python

Introduction

API Endpoint

https://api.skinport.com/v1/

Skinport provides a simple and powerful REST API to integrate sales, items and other marketplace features into your business or application.

Authentication

NEVER SHARE YOUR API KEY WITH ANYONE. YOUR API KEY GRANTS FULL, UNRESTRICTED ACCESS TO YOUR SKINPORT ACCOUNT.

You can obtain a Skinport API key in your Skinport Settings.

BASIC Authentication

BASIC Authentication

echo -n "9c45d62fb05844c59d2b3d15b34999e9:7BqDNcVWX7UqYpkIuueJa2cTD0KH/SrX4Quz3M63xRYzEzK1xvdFOwxN265htfKMjsTGkKv+UIP63QFIBwGuEw==" | base64
const clientId = '9c45d62fb05844c59d2b3d15b34999e9';
const clientSecret = '7BqDNcVWX7UqYpkIuueJa2cTD0KH/SrX4Quz3M63xRYzEzK1xvdFOwxN265htfKMjsTGkKv+UIP63QFIBwGuEw==';
const encodedData = Buffer.from(`${clientId}:${clientSecret}`).toString('base64');
const authorizationHeaderString = `Authorization: Basic ${encodedData}`;

import base64

clientId = "9c45d62fb05844c59d2b3d15b34999e9"
clientSecret = "7BqDNcVWX7UqYpkIuueJa2cTD0KH/SrX4Quz3M63xRYzEzK1xvdFOwxN265htfKMjsTGkKv+UIP63QFIBwGuEw=="
clientData = f"{clientId}:{clientSecret}"
encodedData = str(base64.b64encode(clientData.encode("utf-8")), "utf-8")
authorizationHeaderString = f"Basic {encodedData}"

Creating a secure request requires the use of your API key and your shared secret before submitting it. Our API requires HTTP Basic Authentication combined with HTTPS as its authentication mechanism. This means that you must pass the HTTP Authorization header to access secure resources and this header is generated from your API key and secret in the following form:

Authorization: Basic Base64(Client_ID:Client_secret)

Before encoding the credentials, combine them by listing the Client ID value, a colon, then the Client secret value.

In other words, Base64 encode the following: Client_ID:Client_secret

Interacting with the API

Status Codes

Making requests

As per RESTful design patterns, Skinport API implements following HTTP verbs:

When making requests, arguments can be passed as params, form data or JSON with correct Content-Type header.

Errors

Generic error response (4xx, 5xx)

{
  "errors": [
    {
      "id": "not_found",
      "message": "Not found"
    }
  ]
}

Validation failed (400)

{
  "errors": [
    {
      "id": "validation_error",
      "message": "Please enter a valid email address."
    }
  ]
}

All error messages will return both machine (id) and human readable (message) error message. All errors, except validation_error, return only one error.

validation_error with status code 400 is returned when the validation of the resource fails on POST or PUT requests. Response contains errors field with a list of errors.

Important: Different error types (id) can be added and removed over time so you should make sure your application accepts new ones as well.

Error id Code Description
param_required 400 Missing parameter
validation_error 400 Unable to validate POST/PUT
invalid_request 400 Invalid request
authentication_error 401 Invalid auth (generic)
insufficient_funds 402 User has insufficient funds
invalid_scope 403 User hasn't authenticated necessary scope
not_found 404 Resource not found
rate_limit_exceeded 429 Rate limit exceeded
internal_server_error 500 Internal server error

Items

Example items request

curl --request GET \
  --url https://api.skinport.com/v1/items?app_id=730¤cy=EUR&tradable=0 \
const request = require('request');

request({
    method: 'GET',
    url: 'https://api.skinport.com/v1/items',
    gzip: true,
    qs: {
        app_id: 730,
        currency: 'EUR',
        tradable: 0,
    },
}, (error, response, body) => {
    if (error) throw new Error(error);

    console.log(body);
});
import requests

r = requests.get("https://api.skinport.com/v1/items", params={
    "app_id": 730,
    "currency": "EUR",
    "tradable": 0
}).json()

print(r)

Example items resource

[
  {
    "market_hash_name": "AK-47 | Aquamarine Revenge (Battle-Scarred)",
    "currency": "EUR",  
    "suggested_price": 13.18,
    "item_page": "https://skinport.com/item/csgo/ak-47-aquamarine-revenge-battle-scarred",
    "market_page": "https://skinport.com/market/730?cat=Rifle&item=Aquamarine+Revenge",
    "min_price": 11.33,
    "max_price": 18.22,
    "mean_price": 12.58,
    "quantity": 25,
    "created_at": 1535988253,
    "updated_at": 1568073728
  },
  {
    "market_hash_name": "★ M9 Bayonet | Fade (Factory New)",
    "currency": "EUR",
    "suggested_price": 319.11,
    "item_page": "https://skinport.com/item/csgo/m9-bayonet-fade-factory-new",
    "market_page": "https://skinport.com/market/730?cat=Knife&item=Fade",
    "min_price": null,
    "max_price": null,
    "mean_price": null,
    "quantity": 0,
    "created_at": 1535988302,
    "updated_at": 1568073725
  }
]

HTTP Request

GET /v1/items

No Authorization required

Rate Limit 8 requests / 5 Minutes

Endpoint is cached by 5 minutes.

Arguments

Parameter Type Required Description
app_id number Optional The app_id for the inventory's game (default 730).
currency string Optional The currency for pricing (default EUR - Supported: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HRK, NOK, PLN, RUB, SEK, TRY, USD).
tradable boolean Optional If true, it shows only tradable items on the market (Default false)

Sales

History

Example sales history request

curl --request GET \
  --url 'https://api.skinport.com/v1/sales/history?app_id=730&market_hash_name=Glove%20Case%20Key%2C%E2%98%85%20Karambit%20%7C%20Slaughter%20(Minimal%20Wear)'
const request = require('request');

request({
    method: 'GET',
    url: 'https://api.skinport.com/v1/sales/history',
    gzip: true,
    qs: {
        app_id: 730,
        currency: 'EUR',
        market_hash_name: 'Glove Case Key,★ Karambit | Slaughter (Minimal Wear)'
    },
}, (error, response, body) => {
    if (error) throw new Error(error);

    console.log(body);
});
import requests

r = requests.get("https://api.skinport.com/v1/sales/history", params={
    "app_id": 730,
    "currency": "EUR",
    "market_hash_name": "Glove Case Key,★ Karambit | Slaughter (Minimal Wear)"
}).json()

print(r)

Example sales history resource

[
  {
    "market_hash_name": "Glove Case Key",
    "currency": "EUR",
    "item_page": "https://skinport.com/item/csgo/glove-case-key",
    "market_page": "https://skinport.com/market/730?cat=Key&item=Glove+Case+Key",
    "sales": [
      {
        "price": 1.77,
        "wear_value": null,
        "sold_at": 1568005548
      },
      {
        "price": 1.77,
        "wear_value": null,
        "sold_at": 1567816819
      },
      {
        "price": 1.77,
        "wear_value": null,
        "sold_at": 1567816819
      }
    ],
    "last_7_days": {
      "min": 1.77,
      "max": 1.95,
      "avg": 1.81,
      "volume": 4
    },
    "last_30_days": {
      "min": 1.77,
      "max": 2.03,
      "avg": 1.93,
      "volume": 59
    },
    "last_90_days": {
      "min": 1.77,
      "max": 2.03,
      "avg": 1.93,
      "volume": 68
    }
  },
  {
    "market_hash_name": "★ Karambit | Slaughter (Minimal Wear)",
    "item_page": "https://skinport.com/item/csgo/karambit-slaughter-minimal-wear",
    "market_page": "https://skinport.com/market/730?cat=Knife&type=Karambit&item=Slaughter",
    "currency": "EUR",  
    "sales": [
      {
        "price": 250,
        "wear_value": 0.13740462064743042,
        "sold_at": 1565526086
      },
      {
        "price": 300,
        "wear_value": 0.07707387208938599,
        "sold_at": 1562708712
      }
    ],
    "last_7_days": {
      "min": null,
      "max": null,
      "avg": null,
      "volume": 0
    },
    "last_30_days": {
      "min": 250,
      "max": 250,
      "avg": 250,
      "volume": 1
    },
    "last_90_days": {
      "min": 250,
      "max": 300,
      "avg": 275,
      "volume": 2
    }
  }
]

HTTP Request

GET /v1/sales/history

No Authorization required

Arguments

Parameter Type Required Description
market_hash_name string Required The item's names, comma-delimited.
app_id number Optional The app_id for the inventory's game (default 730).
currency string Optional The currency for pricing (default EUR - Supported: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HRK, NOK, PLN, RUB, SEK, TRY, USD).

TODO sales history text

Out of Stock

Example out of stock request

curl --request GET \
  --url 'https://api.skinport.com/v1/sales/out-of-stock?app_id=730&currency=EUR'
const request = require('request');

request({
    method: 'GET',
    url: 'https://api.skinport.com/v1/sales/out-of-stock',
    gzip: true,
    qs: {
        app_id: 730,
        currency: 'EUR',
    },
}, (error, response, body) => {
    if (error) throw new Error(error);

    console.log(body);
});
import requests

r = requests.get("https://api.skinport.com/v1/sales/out-of-stock", params={
    "app_id": 730,
    "currency": "EUR"
}).json()

print(r)

Example sales history resource

[
    {
        "market_hash_name": "Souvenir AWP | Desert Hydra (Factory New)",
        "version": null,
        "currency": "EUR",
        "suggested_price": 9995.66,
        "avg_sale_price": 6287.45,
        "sales_last_90d": 6
    },
    {
        "market_hash_name": "★ Butterfly Knife | Gamma Doppler (Factory New)",
        "version": "Emerald",
        "currency": "EUR",
        "suggested_price": 15110.53,
        "avg_sale_price": 11786.21,
        "sales_last_90d": 2
    },
    {
        "market_hash_name": "★ Sport Gloves | Vice (Factory New)",
        "version": null,
        "currency": "EUR",
        "suggested_price": 26309.29,
        "avg_sale_price": 22484.59,
        "sales_last_90d": 1
    },
    {
        "market_hash_name": "★ Sport Gloves | Pandora's Box (Minimal Wear)",
        "version": null,
        "currency": "EUR",
        "suggested_price": 9099.2,
        "avg_sale_price": 5762.36,
        "sales_last_90d": 3
    }
]

HTTP Request

GET /v1/sales/out-of-stock

No Authorization required. Cached 1 hour.

Arguments

Parameter Type Required Description
app_id number Optional The app_id for the inventory's game (default 730).
currency string Optional The currency for pricing (default EUR - Supported: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HRK, NOK, PLN, RUB, SEK, TRY, USD).

Account

Transactions

Example account transactions request

curl --request GET \
  --url 'https://api.skinport.com/v1/account/transactions?page=1&limit=100&order=desc' \
  --header 'authorization: Basic OWM0NWQ2MmZiMDU4NDRjNTlkMmIzZDE1YjM0OTk5ZTk6ZGhFS2NCYzdvNE1DZWs3VXFQR2JFN2lNcXJHS2VueFBVRlI4MVN3RG9pTEdjcWcrMjRpRURHMFZjS3ZyQ1EzMnppcjN0VVB3eDFibzY5cEp4L0poanc9PQ=='
const request = require('request');

request({
    method: 'GET',
    url: 'https://api.skinport.com/v1/account/transactions',
    gzip: true,
    qs: {
        page: 1,
        limit: 100,
        order: 'desc'
    },
    headers: {
        authorization: 'Basic OWM0NWQ2MmZiMDU4NDRjNTlkMmIzZDE1YjM0OTk5ZTk6ZGhFS2NCYzdvNE1DZWs3VXFQR2JFN2lNcXJHS2VueFBVRlI4MVN3RG9pTEdjcWcrMjRpRURHMFZjS3ZyQ1EzMnppcjN0VVB3eDFibzY5cEp4L0poanc9PQ=='
    },
}, (error, response, body) => {
    if (error) throw new Error(error);

    console.log(body);
});
import requests

r = requests.get("https://api.skinport.com/v1/account/transactions", headers={
    "authorization": "Basic OWM0NWQ2MmZiMDU4NDRjNTlkMmIzZDE1YjM0OTk5ZTk6ZGhFS2NCYzdvNE1DZWs3VXFQR2JFN2lNcXJHS2VueFBVRlI4MVN3RG9pTEdjcWcrMjRpRURHMFZjS3ZyQ1EzMnppcjN0VVB3eDFibzY5cEp4L0poanc9PQ=="
}, params={
    "page": 1,
    "limit": 100,
    "order": "desc"
}).json()

print(r)

Example sales history resource

{
    "pagination": {
        "page": 1,
        "pages": 1,
        "limit": 100,
        "order": "desc"
    },
    "data": [
        {
            "id": 9999993,
            "type": "credit",
            "sub_type": "item",
            "status": "complete",
            "amount": 1.57,
            "fee": 0.09,
            "currency": "EUR",
            "items": [
                {
                    "sale_id": 9999321,
                    "market_hash_name": "Mann Co. Supply Crate Key",
                    "seller_country": "DE",
                    "buyer_country": "DE"
                }
            ],
            "created_at": "2021-10-11T21:22:24.425Z",
            "updated_at": "2021-10-11T21:22:24.425Z"
        },
        {
            "id": 9999992,
            "type": "withdraw",
            "sub_type": null,
            "status": "complete",
            "amount": 1333.70,
            "fee": null,
            "currency": "EUR",
            "items": null,
            "created_at": "2021-10-11T05:30:10.880Z",
            "updated_at": "2021-10-11T06:14:07.427Z"
        },
        {
            "id": 9999991,
            "type": "purchase",
            "sub_type": null,
            "status": "complete",
            "amount": 90.01,
            "fee": null,
            "currency": "EUR",
            "items": [
                {
                    "sale_id": 9999123,
                    "market_hash_name": "★ Huntsman Knife",
                    "seller_country": "US",
                    "buyer_country": "DE"
                }
            ],
            "created_at": "2021-08-27T03:00:34.728Z",
            "updated_at": "2021-08-27T03:00:58.488Z"
        }
    ]
}

HTTP Request

GET /v1/account/transactions

Authorization required

Arguments

Parameter Type Required Description
page number Optional Pagination Page (default 1).
limit number Optional Limit results between 1 and 100 (default 100).
order string Optional Order results by asc or desc (default desc).

WebSocket

saleFeed

saleFeedJoin

Example saleFeedJoin

const { io } = require("socket.io-client");

const socket = io('https://skinport.com', {
  transports: ['websocket'],
});

// Listen to the Sale Feed
socket.on('saleFeed', (result) => {
  console.log(result);
});

// Join Sale Feed with paramters.
socket.emit('saleFeedJoin', {currency: 'EUR', locale: 'en', appid: 730})

Example response from console.log(result)

{
    "eventType": "listed",
    "sales": [
        {
            "id": 0,
            "saleId": 6934215,
            "productId": 5544725,
            "assetId": 55034907,
            "itemId": 61019,
            "appid": 730,
            "steamid": "76561198837215063",
            "url": "driver-gloves-rezan-the-red-well-worn",
            "family": "Rezan the Red",
            "family_localized": "Rezan the Red",
            "name": "Rezan the Red",
            "title": "Driver Gloves",
            "text": "Well-Worn ★ Extraordinary Gloves",
            "marketName": "★ Driver Gloves | Rezan the Red (Well-Worn)",
            "marketHashName": "★ Driver Gloves | Rezan the Red (Well-Worn)",
            "color": "#8650AC",
            "bgColor": null,
            "image": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DAX1R3LjtQurWzLhRfwP_BcjZ9_tmslY60mvLwOq7cqWdQ-sJ0xLCTpt6l0AawrkNvajz7LdXDJFJtMguBqwfokrvn0cC0upTAmCdru3Q8pSGKBwn68BM",
            "classid": "4142171394",
            "assetid": "24958657824",
            "lock": "2022-02-27T08:00:00.000Z",
            "version": "default",
            "versionType": "default",
            "stackAble": false,
            "suggestedPrice": 10004,
            "salePrice": 7903,
            "currency": "EUR",
            "saleStatus": "listed",
            "saleType": "public",
            "category": "Gloves",
            "category_localized": "Gloves",
            "subCategory": "Driver Gloves",
            "subCategory_localized": "Driver Gloves",
            "pattern": 990,
            "finish": 10069,
            "customName": null,
            "wear": 0.3809339106082916,
            "link": "steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S76561198837215063A24958657824D11533664215916898619",
            "type": "★ Extraordinary Gloves",
            "exterior": "Well-Worn",
            "quality": "★",
            "rarity": "Extraordinary",
            "rarity_localized": "Extraordinary",
            "rarityColor": "#eb4b4b",
            "collection": null,
            "collection_localized": null,
            "stickers": [],
            "canHaveScreenshots": true,
            "screenshots": [],
            "souvenir": false,
            "stattrak": false,
            "tags": [
                {
                    "name": "Well-Worn",
                    "name_localized": "Well-Worn"
                },
                {
                    "name": "★",
                    "name_localized": "★"
                },
                {
                    "name": "Gloves",
                    "name_localized": "Gloves"
                },
                {
                    "name": "Extraordinary",
                    "name_localized": "Extraordinary"
                }
            ],
            "ownItem": false
        }
    ]
}

Arguments

Parameter Type Required Description
appid number Required The appid for the inventory's game.
currency string Required The currency for pricing (Supported: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HRK, NOK, PLN, RUB, SEK, TRY, USD).
locale string Required Locale of the result (Supported: en, de, ru, fr, zh, nl,fi, es, tr).