Library referenceClasses
TokenMarketApi
the market behind a login: listings, the player's inventory, sales and history, the black market
Constructors
Constructor
new TokenMarketApi(gapi, auth): TokenMarketApi;Parameters
| Parameter | Type |
|---|---|
gapi | KrunkerClient |
auth | Record<string, string> |
Returns
TokenMarketApi
Methods
blackMarket()
blackMarket(): Promise<BlackMarket>;GET /market/black-market, the skin indices on offer
Returns
Promise<BlackMarket>
blackMarketRank()
blackMarketRank(): Promise<BlackMarketRank>;GET /market/black-market/rank, the player's peak mmr for the ranked tier of the black market
Returns
Promise<BlackMarketRank>
history()
history(query?): Promise<MarketHistory>;GET /market/history, the player's completed buys and sells, newest first by default
Parameters
| Parameter | Type |
|---|---|
query? | MarketHistoryQuery |
Returns
Promise<MarketHistory>
inventory()
inventory(): Promise<InventoryStack[]>;GET /market/inventory, the player's stacks
Returns
Promise<InventoryStack[]>
listings()
listings(query?): Promise<MarketListings>;GET /market/listings, what the market tab shows; a token is required although the data is not about the player
Parameters
| Parameter | Type |
|---|---|
query? | MarketListingsQuery |
Returns
Promise<MarketListings>
sales()
sales(): Promise<OpenListing[]>;GET /market/sales, the player's own open listings
Returns
Promise<OpenListing[]>