Place order
POST/v1/orders
Place a limit or market order. Either the buy amount or sell amount is required, but not both. If the order is not immediately filled or killed, but rather it is returned back with 'pending' status, then it may be necessary to try to retrieve the order again later for status updates.
Request
- application/json
Body
Order type may be either limit order or market order.
Possible values: [limit, market]
limitClient's unique identifier for the order.
The currency that you want to buy.
USDThe currency that you want to sell.
BRLThe amount that you want to buy.
1000The amount that you want to sell.
0The tenor value for the quote e.g. SPOT, CASH (T+0), NEXT DAY (T+1)
Possible values: [SPOT, TOD, TOM]
SPOTSPOTRestrict quotes to specified sources.
["CAB","Corpay"]Limit price for the order using market conventions. Valid for limit orders only.
3.141592Instrument for limit price. Valid for limit orders only.
Possible values: >= 6 characters and <= 6 characters
USDBRLOrder notes.
Possible values: <= 256 characters
My order notesResponses
- 200
- 401
- 403
- 409
- 500
Order successfully placed.
- application/json
- Schema
- Example (from schema)
Schema
order
object
required
An Order can placed and filled or klled (FoK). A fill may result in a Trade. Both limit and market order types are supported.
Unique identifier for the order
Order type may be either limit order or market order.
Possible values: [limit, market]
limitCurrent fulfillment state of the order
Client's unique identifier for the order.
The currency that you want to buy.
The currency that you want to sell.
The amount that you want to buy.
The amount that you want to sell.
The tenor value for the quote e.g. SPOT, CASH (T+0), NEXT DAY (T+1)
Possible values: [SPOT, TOD, TOM]
SPOTSPOTRestrict quotes to specified sources.
limit price for the order using market conventions. Valid for limit orders only.
Order notes.
Possible values: <= 256 characters
status
object
Order status for the specified order id.
Order status for given order id.
Possible values: [pending, filled, killed]
Timestamp of last status update.
quote
object
A Quote may result from a successful quotes request.
The unique identifier for the quote.
The source's unique identifier for the quote.
The unique identifier fo the client.
The rate for the quote.
The source of the quote.
The quote expiry in milliseconds.
Quote date.
Rejection status.
Possible values: [pending, accepted, rejected]
pendingtrade
object
A Trade may result from a successfully executed order or quote.
Id for the trade.
Source order id for the trade.
Source execution id for the trade.
Source for the exected trade.
The currency that you bought.
The currency that you sold.
The amount that you bought.
The anount that you sold.
The rate for the trade.
Trade date.
{
"order": {
"id": "string",
"order_type": "limit",
"order_state": "string",
"client_order_id": "string",
"buy_currency": "string",
"sell_currency": "string",
"buy_amount": 0,
"sell_amount": 0,
"tenor": "SPOT",
"sources": [
"string"
],
"limit_price": 0,
"order_notes": "string",
"status": {
"status": "pending",
"timestamp": "2024-07-29T15:51:28.071Z"
}
},
"quote": {
"id": "string",
"source_id": "string",
"client_id": "string",
"rate": 0,
"source": "string",
"expires": 0,
"quote_date": "2024-07-29T15:51:28.071Z",
"status": "pending"
},
"trade": {
"id": "string",
"source_order_id": "string",
"source_execution_id": "string",
"source": "string",
"buy_currency": "string",
"sell_currency": "string",
"buy_amount": 0,
"sell_amount": 0,
"price": 0,
"trade_date": "2024-07-29T15:51:28.071Z"
}
}
Authentication token is required for this action that was not provided, expired or invalid.
- application/json
- Schema
- Example (from schema)
Schema
Links error message to a specific event in the system.
The code for the error that has occurred.
The text for the error that has occurred.
An optional parameter name related to the error. Usually present for input validation errors.
An optional parameter value related to the error. Set to input value of named parameter.
{
"errorId": "string",
"code": "string",
"text": "string",
"parameter_name": "string",
"parameter_value": {}
}
Not authorized for the requested action.
- application/json
- Schema
- Example (from schema)
Schema
Links error message to a specific event in the system.
The code for the error that has occurred.
The text for the error that has occurred.
An optional parameter name related to the error. Usually present for input validation errors.
An optional parameter value related to the error. Set to input value of named parameter.
{
"errorId": "string",
"code": "string",
"text": "string",
"parameter_name": "string",
"parameter_value": {}
}
Action could not be completed because of conflict.
- application/json
- Schema
- Example (from schema)
Schema
Links error message to a specific event in the system.
The code for the error that has occurred.
The text for the error that has occurred.
An optional parameter name related to the error. Usually present for input validation errors.
An optional parameter value related to the error. Set to input value of named parameter.
{
"errorId": "string",
"code": "string",
"text": "string",
"parameter_name": "string",
"parameter_value": {}
}
Internal server error.
- application/json
- Schema
- Example (from schema)
Schema
Links error message to a specific event in the system.
The code for the error that has occurred.
The text for the error that has occurred.
An optional parameter name related to the error. Usually present for input validation errors.
An optional parameter value related to the error. Set to input value of named parameter.
{
"errorId": "string",
"code": "string",
"text": "string",
"parameter_name": "string",
"parameter_value": {}
}