Skip to main content

Create Order

POST 

/v1/trade/orders

Create a new order to buy/sell assets in any available market.

Requires authentication.

Request

Body

    market stringrequired

    Market ID.

    side stringrequired

    Possible values: [BUY, SELL]

    If is a selling or buyer order.

    type stringrequired

    Possible values: [LIMIT, MARKET]

    A Limit order has a limit price (maximum to buy or minimum to sell). A Market one executes using the current prices on top of the book.

    time_in_force stringrequired

    Possible values: [FOK, GTC, IOC]

    Define how the order will be executed:

    • Fill-Or-Kill (FOK) is used when the type is MARKET, being totally executed if having offers on the order book;
    • Good-'Til-Canceled (GTC) will be active until be canceled;
    • Immediate-Or-Cancel (IOC), being immediately executed even if partially.
    size stringrequired

    Amount of asset being offered or asked.

    price string

    Value being offered or asked. It is required in LIMIT orders.

    custom_id string

    A unique identification send by customer. Can be used to retrieve the order in place of the order id.

Responses

Created

Response Headers
    Schema
      result object

      An offer to trade (buy or sell) certain amount of an asset at a certain price in exchange for another asset (these assets are caracterized by a market).

      id string

      Order Id.

      market string

      Market ID.

      side string

      Possible values: [BUY, SELL]

      If is a selling or buyer order.

      type string

      Possible values: [LIMIT, MARKET]

      A Limit order has a limit price (maximum to buy or minimum to sell). A Market one executes using the current prices on top of the book.

      status string

      Possible values: [CANCELED, FILLED, OPEN, PARTIALLY_FILLED, PENDING_CANCELING, SUBMITTING]

      A stage of the order life cycle:

      • SUBMITTING: Order being sent or during general validation.
      • OPEN: Order created waiting to be matched.
      • PARTIALLY_FILLED: Order partially matched.
      • FILLED: Order filled / completed.
      • PENDING_CANCELING: User asks to cancel the order and the canceling is being processed.
      • CANCELED: Order canceled.
      time_in_force string

      Possible values: [FOK, GTC, IOC]

      Define the how the order will be executed:

      • Fill-Or-Kill (FOK) will be immediately totally executed at the price or better, otherwise, it will be completely cancelled; It can be used with types: MARKET and LIMIT;
      • Good-'Til-Canceled (GTC) will be remaining active until it were fully executed or canceled; It can be used with type: LIMIT;
      • Immediate-Or-Cancel (IOC) will be immediately executed at the price or better, even if partially, and canceled if not fully executed; It can be used with types: MARKET and LIMIT;
      price string

      Value being offered or asked. It is used in LIMIT orders.

      size string

      Amount of asset being offered or asked.

      fee string

      Fee charged when this order matched. When it is a buy order, the currency of this fee is the currency of the base side of the traded pair. When it is sell, the currency is the same of the quote side of the pair.

      fee_currency string

      Currency in which the fee is being charged.

      filled string

      An order can match partially with one or more other orders until completely fill the order size. This field is the amount filled until the moment or until the order were finished (canceled or filled).

      filled_weighted_price string

      Weighted average price of the filled amount.

      custom_id string

      A unique identification send by customer. Can be used to retrieve the order in place of the order id.

      cancel_readon

      Possible values: [USER_REQUESTED, EXPIRED, REJECTED, SELF_TRADE]

      When status canceled, return the reason:

      • USER_REQUESTED: Requested by customer.
      • EXPIRED: Not filled FOK orders.
      • REJECTED: System problems.
      • SELF_TRADE: When already there is a oposite order on the book from the same customer, the old one is canceled.
      created_at created_at (integer)

      Timestamp of when this object was created.

      updated_at updated_at (integer)

      Timestamp of when this object was updated.

    Loading...