Skip to main content

Get Closed Orders

POST 

/private/ClosedOrders

Retrieve information about orders that have been closed (filled or cancelled). 50 results are returned at a time, the most recent by default.

Note: If an order's tx ID is given for start or end time, the order's opening time (opentm) is used

API Key Permissions Required: Orders and trades - Query closed orders & trades

Request

Body

required
    nonce int64required

    Nonce used in construction of API-Sign header

    trades boolean

    Whether or not to include trades related to position in output

    userref int32

    Restrict results to given user reference

    cl_ord_id string

    Restrict results to given client order id

    start integer

    Starting unix timestamp or order tx ID of results (exclusive)

    end integer

    Ending unix timestamp or order tx ID of results (inclusive)

    ofs integer

    Result offset for pagination

    closetime string

    Possible values: [open, close, both]

    Default value: both

    Which time to use to search

    consolidate_taker boolean

    Default value: true

    Whether or not to consolidate trades by individual taker trades

Responses

Closed orders info retrieved.

Schema
    result object

    Closed Orders

    closed object
    property name* txid

    Closed Order

    refid stringnullable

    Referral order transaction ID that created this order

    userref integernullable

    Optional numeric, client identifier associated with one or more orders.

    cl_ord_id stringnullable

    Optional alphanumeric, client identifier associated with the order.

    status string

    Possible values: [pending, open, closed, canceled, expired]

    Status of order

    • pending = order pending book entry
    • open = open order
    • closed = closed order
    • canceled = order canceled
    • expired = order expired
    opentm number

    Unix timestamp of when order was placed

    starttm number

    Unix timestamp of order start time (or 0 if not set)

    expiretm number

    Unix timestamp of order end time (or 0 if not set)

    descr object

    Order description info

    pair string

    Asset pair

    type string

    Possible values: [buy, sell]

    Type of order (buy/sell)

    ordertype string

    Possible values: [market, limit, iceberg, stop-loss, take-profit, trailing-stop, stop-loss-limit, take-profit-limit, trailing-stop-limit, settle-position]

    Order type

    price string

    primary price

    price2 string

    Secondary price

    leverage string

    Amount of leverage

    order string

    Order description

    close string

    Conditional close order description (if conditional close set)

    vol string

    Volume of order (base currency)

    vol_exec string

    Volume executed (base currency)

    cost string

    Total cost (quote currency unless)

    fee string

    Total fee (quote currency)

    price string

    Average price (quote currency)

    stopprice string

    Stop price (quote currency)

    limitprice string

    Triggered limit price (quote currency, when limit based order type triggered)

    trigger string

    Possible values: [last, index]

    Default value: last

    Price signal used to trigger "stop-loss" "take-profit" "stop-loss-limit" "take-profit-limit" orders.

    • last is the implied trigger if this field is not set.
    margin boolean

    Indicates if the order is funded on margin.

    misc string

    Comma delimited list of miscellaneous info:

    • stopped triggered by stop price
    • touched triggered by touch price
    • liquidated liquidation
    • partial partial fill
    • amended order parameters modified
    oflags string

    Comma delimited list of order flags:

    • post post-only order (available when ordertype = limit)
    • fcib prefer fee in base currency (default if selling)
    • fciq prefer fee in quote currency (default if buying, mutually exclusive with fcib)
    • nompp disable market price protection for market orders
    • viqc order volumes expressed in quote currency.
    trades string[]

    List of trade IDs related to order (if trades info requested and data available)

    sender_sub_id stringnullable

    For institutional accounts, identifies underlying sub-account/trader for Self Trade Prevention (STP).

    closetm number

    Unix timestamp of when order was closed

    reason string

    Additional info on status (if any)

    count integer

    Amount of available order info matching criteria

    error string[]
Loading...