Place an Order
The method POST /orders
enables you to place a buy or sell order. Both Limit and Market orders are available.
HTTP Request
Header Parameters
You must specify the following authorization parameters in your request:
Parameter | Description | Required |
---|---|---|
key | See the section, Authentication | Yes |
signature | See the section, Authentication | Yes |
nonce | See the section, Authentication | Yes |
Body Parameters
Body parameters must be JSON encoded and precisely the same as the JSON payload used to construct the signature:
Parameter | Description | Required |
---|---|---|
book | The book to use. | Yes |
major | The amount of the major currency for this order. You must specify an order in either major or minor , never both. | No |
minor | The amount of the minor currency for this order. You must specify an order in terms of either major or minor , never both. | No |
origin_id | The order's client-supplied, unique ID (if any). Valid character set: a to z (lower and uppercase), 0 to 9 , underscore, _ , and dash, - . Maximum length = 40 characters. | No |
price | The price per unit of major. Use this parameter only with Limit Orders. The rounding algorithm considers only eight decimal places, rounding up to the nearest price when selling and down when buying. | No |
side | The order's side. Valid values: buy and sell . | Yes |
stop | The price per unit of major at which to stop and place the order. Use this parameter only with Stop Orders. | No |
time_in_force | The period a Limit Order remains active before it is executed or expires. Valid values: goodtillcancelled , fillorkill , immediateorcancel , and postonly . | No |
type | The order's type. Valid values: market and limit . | Yes |
JSON Response Payload
The endpoint returns a JSON object representing the order. This object includes the following field:
Field Name | Description | Type |
---|---|---|
oid | The order's unique ID. | String |
The following response object exemplifies the JSON object returned:
{
"success": true,
"payload": {
"oid": "qlbga6b600n3xta7"
}
}
Updated 11 days ago