Skip to main content
POST
/
trade
/
orders
Orders - Create Order
curl --request POST \
  --url https://api.ripio.com/trade/orders \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --header 'signature: <signature>' \
  --header 'timestamp: <timestamp>' \
  --data '
{
  "pair": "<string>",
  "side": "<string>",
  "type": "<string>",
  "amount": 123,
  "price": 123,
  "value": 123,
  "stop_price": 123,
  "distance": 123,
  "step_amount": 123,
  "external_id": "0f4a8504-21fb-4be6-9771-25dcf5f68f87",
  "post_only": true,
  "expiration": 123,
  "immediate_or_cancel": true,
  "fill_or_kill": true
}
'
{
  "data": {
    "id": "7155ED34-9EC4-4733-8B32-1E4319CB662F",
    "create_date": "2024-03-27T13:27:19.853Z",
    "executed_amount": 0,
    "external_id": "BEAB10B1-45B0-4999-9B2F-D2ED048D6C42",
    "pair": "BTC_BRL",
    "remaining_amount": 10,
    "remaining_value": 1000,
    "requested_amount": 10,
    "requested_value": 1000,
    "side": "buy",
    "status": "open"
  },
  "error_code": null,
  "message": null
}

Headers

authorization
string
required

The API key as a string.

signature
string
required

See the Generating Signature section for more details.

timestamp
number
required

A timestamp in milliseconds. See the Timestamp Security section for more details.

timstamp-tolerance
number

An additional, non-required parameter, that you can send to specify the number of milliseconds after the timestamp for the request to be valid. See the Timestamp Security section for more details.

Body

application/json
pair
string
required

Currency pair code

side
string
required

Order's side (buy)

type
string
required

Order's type (limit)

amount
number
required

Order amount in base currency

price
number
required

Limit price

value
number
required

Order value in quote currency

stop_price
number
required

Stop price

distance
number
required

Price distance

step_amount
number
required

Step amount (the ratio of amount to step_amount must be less than or equal to 10)

external_id
string

Order external identifier (maximum of 36 chars)

Example:

"0f4a8504-21fb-4be6-9771-25dcf5f68f87"

post_only
boolean

If set to true, the order will be added directly to the order book without an initial match, provided the request is valid

expiration
number

If a valid timestamp is provided, the order will be created with an expiration date and time

immediate_or_cancel
boolean

If set to true, the order will not be added to the order book after the initial match, any remaining unfilled amount will result in the order being canceled

fill_or_kill
boolean

If set to true, the order will either be completely filled or canceled

Response

200 - application/json

Ok

data
object
required
Example:
{
"id": "7155ED34-9EC4-4733-8B32-1E4319CB662F",
"create_date": "2024-03-27T13:27:19.853Z",
"executed_amount": 0,
"external_id": "BEAB10B1-45B0-4999-9B2F-D2ED048D6C42",
"pair": "BTC_BRL",
"remaining_amount": 10,
"remaining_value": 1000,
"requested_amount": 10,
"requested_value": 1000,
"side": "buy",
"status": "open"
}
error_code
number
required
Example:

null

message
string
required
Example:

null