Create Order
POST/v1/trade/orders
Create a new order to buy/sell assets in any available market.
Requires authentication.
Request
- application/json
Body
- 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.
Market ID.
Possible values: [BUY
, SELL
]
If is a selling or buyer order.
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.
Possible values: [FOK
, GTC
, IOC
]
Define how the order will be executed:
Amount of asset being offered or asked.
Value being offered or asked. It is required in LIMIT orders.
A unique identification send by customer. Can be used to retrieve the order in place of the order id.
Responses
- 201
Created
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- 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.
- 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
andLIMIT
; - 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
andLIMIT
; - 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.
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).
Order Id.
Market ID.
Possible values: [BUY
, SELL
]
If is a selling or buyer order.
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.
Possible values: [CANCELED
, FILLED
, OPEN
, PARTIALLY_FILLED
, PENDING_CANCELING
, SUBMITTING
]
A stage of the order life cycle:
Possible values: [FOK
, GTC
, IOC
]
Define the how the order will be executed:
Value being offered or asked. It is used in LIMIT orders.
Amount of asset being offered or asked.
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.
Currency in which the fee is being charged.
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).
Weighted average price of the filled amount.
A unique identification send by customer. Can be used to retrieve the order in place of the order id.
Possible values: [USER_REQUESTED
, EXPIRED
, REJECTED
, SELF_TRADE
]
When status canceled, return the reason:
Timestamp of when this object was created.
Timestamp of when this object was updated.
{
"result": {
"id": "446866913146962177",
"market": "BTC-USD",
"side": "BUY",
"type": "LIMIT",
"status": "OPEN",
"time_in_force": "GTC",
"price": "23250.0",
"size": "0.01",
"fee": "0",
"fee_currency": "BTC",
"filled": "0",
"filled_weighted_price": "0",
"custom_id": "7766052b-16a5-49a3-a572-d75d6f5484d2",
"created_at": 1675893837458805,
"updated_at": 1675893844084384
}
}