Create limit order

post
https://api.cryptomus.com/v2/user-api/convert/limit
COPY

Request

Query parameters

NameParameter typeDefinition
from*stringmax:10Currency to convert From
to*stringmax:10Currency to convert To
amount*stringAmount to be converted in currency fromIf there are pennies in the amount, then send them with a separator '.'
Example: 10.28
price*stringPrice to convertIf there are pennies in the amount, then send them with a separator '.'
Example: 10.28

Parameter type

stringmax:10

Definition

Currency to convert From

Parameter type

stringmax:10

Definition

Currency to convert To

Parameter type

string

Definition

Amount to be converted in currency fromIf there are pennies in the amount, then send them with a separator '.'
Example: 10.28

Parameter type

string

Definition

Price to convertIf there are pennies in the amount, then send them with a separator '.'
Example: 10.28

* - mandatory parameter

Request example

curl https://api.cryptomus.com/v2/user-api/convert/limit \
    -X POST \
    -H 'userId: 8b03432e-385b-4670-8d06-064591096795' \
    -H 'sign: fe99035f86fa436181717b302b95bacff1' \
    -H 'Content-Type: application/json' \
    -d '{
        "from": "BTC",
        "to": "USDT",
        "amount": "0.0001",
        "price": "70000"
    }'
COPY

Response

Response parameters

NameDefinition
order_idId of convert
convert_amount_fromConvert amount from
convert_amount_toConvert amount to
executed_amount_toExecuted amount to
executed_amount_fromExecuted amount from
convert_currency_fromConvert currency from
convert_currency_toConvert currency to
typeType enumAvailable options:marketlimit
statusStatus enumAvailable options:activecompletedpartially_completedcancelledexpiredfailed
created_atDate time create
current_rateCurrent rate
limitLimit value (only if type limit)
expires_atLimit expires date time
completed_atDate time when order completed (only if order completed)

Definition

Id of convert

Definition

Convert amount from

Definition

Convert amount to

Definition

Executed amount to

Definition

Executed amount from

Definition

Convert currency from

Definition

Convert currency to

Definition

Type enumAvailable options:- market- limit

Definition

Status enumAvailable options:- active- completed- partially_completed- cancelled- expired- failed

Definition

Date time create

Definition

Current rate

Definition

Limit value (only if type limit)

Definition

Limit expires date time

Definition

Date time when order completed (only if order completed)

Response example


1{
2  "state": 0,
3  "result": {
4    "order_id": "2d9bf426-98ef-448b-84c2-03cc1ec78feb",
5    "convert_amount_from": "10.000",
6    "convert_amount_to": "3.000",
7    "executed_amount_from": null,
8    "executed_amount_to": null,
9    "convert_currency_from": "USDT",
10    "convert_currency_to": "XMR",
11    "type": "market",
12    "status": "completed",
13    "created_at": "2024-07-11 , 18:06:04",
14    "current_rate": "100",
15    "completed_at": "2024-07-11 , 18:06:04"
16  }
17}
COPY