getAllOrders

Provides the all orders of the user:

import { Nectar, KLineInterval } from "@wasd3rplay/nectar-sdk";

const nectar = new Nectar();
const trades = await nectar.getAllOrders({
    symbol: "ETH_ETH:USDT_ETH",
    page: 1
});

Parameters

  • symbol (optional)

    • The market symbol

    • The symbol expression is a combination of base_ticker, a colon (':'), and quote_ticker.

    • If this value is not provided, it will retrieve the all user orders for all markets.

  • 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 user's all orders:

e.g.

  • previous

    • The URL to retrieve the previous page

    • If this value is null, it indicates that there is no previous page to query.

  • next

    • The staring point of the history item as a timestamp

    • If this value is null, it indicates that there is no next page to query.

  • count

    • The total number of orders

  • results

    • The list of orders in the current page

    • id

      • The order ID

    • time

      • The creation timestamp of the order

    • order_type

      • The order type of the order

    • price

      • The amount for buying or selling, expressed in the quote token

    • symbol

      • The market symbol

      • The symbol expression is a combination of base_ticker, a colon (':'), and quote_ticker.

    • base_ticker

      • The base token of the market to buy or sell

      • The ticker expression is a combination of token symbol, an underscore('_'), and the blockchain (network) symbol. So, the above example shows that the base token is the token with the symbol ETH provided by Ethereum (ETH) network.

    • base_ticker_display

      • How to display the base token in the UI

    • quote_ticker

      • The quote token of the market used to buy or sell the base token as the currency

      • The ticker expression is a combination of token symbol, an underscore('_'), and the blockchain (network) symbol. So, the above example shows that the quote token is the token with the symbol USDT provided by Ethereum (ETH) network.

    • quote_ticker_display

      • How to display the quote token in the UI

    • request_amount

      • The desired quantity of the base token for buying or selling

    • traded_amount

      • The traded quantity of the base token

    • status

      • The order status

    • tx_list

      • The list of blockchain transactions

      • status

        • The transaction status

      • time

        • The transaction creation timestamp

      • txhash

        • The transaction hash

        • This value can be used to verify the actual transaction on each blockchain network's block explorer website.

Order Status

Transaction Status