getMarketTrades
Provides the trading history for the designated market through this method:
import { Nectar, KLineInterval } from "@wasd3rplay/nectar-sdk";
const nectar = new Nectar();
const trades = await nectar.getMarketTrades({
symbol: "ETH_ETH:USDT_ETH",
page: 1
});Parameters
symbolThe market symbol
The symbol expression is a combination of
base_ticker, a colon (':'), andquote_ticker.
page(default: 1)The page number to retrieve, which should be greater than or equal to 1
Each page has 20 items
Result
The result of this method is a list of trade histories:
e.g.
{
previous: "<url>" | null,
next: "<url>" | null,
count: 10,
results: [
{
price: '1108000000',
order_type: 1,
base_ticker_amount: '500000000000000000', // 0.5 ETH
quote_ticker_amount: '554000000', // 554 USDT
time: '1691930148'
},
...
]
}previousThe URL to retrieve the previous page
If this value is null, it indicates that there is no previous page to query.
nextThe staring point of the history item as a timestamp
If this value is null, it indicates that there is no next page to query.
countThe total number of trades
resultsThe list of trades in the current page
priceThe price at the trade
order_typeThe order type of the trade
base_ticker_amountThe base token amount of the trade
quote_ticker_amountThe quote token amount of the trade
timeThe trade date/time as a timestamp