リミットオーダーを作成する
post
https://api.cryptomus.com/v2/user-api/convert/limit
リクエスト
クエリパラメーター
名前 | パラメータータイプ | 意味 |
---|---|---|
from* | stringmax:10 | 変換元の通貨 |
to* | stringmax:10 | 変換先の通貨 |
amount* | string | 変換する金額(元通貨)金額にペニーがある場合は、「セパレーター」で送ってください。 例:10.28 |
price* | string | 変換する価格金額にペニーがある場合は、「セパレーター」で送ってください。 例:10.28 |
パラメータータイプ
stringmax:10意味
変換元の通貨パラメータータイプ
stringmax:10意味
変換先の通貨パラメータータイプ
string意味
変換する金額(元通貨)金額にペニーがある場合は、「セパレーター」で送ってください。
例:10.28パラメータータイプ
string意味
変換する価格金額にペニーがある場合は、「セパレーター」で送ってください。
例:10.28
* - 必須パラメーター
リクエスト例
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"
}'
コピー応答
応答パラメーター
名前 | 意味 |
---|---|
order_id | 変換ID |
convert_amount_from | 変換元の金額 |
convert_amount_to | 変換先の金額 |
executed_amount_to | 実行された金額(先) |
executed_amount_from | 実行された金額(元) |
convert_currency_from | 変換通貨元 |
convert_currency_to | 変換通貨先 |
type | 列挙型利用可能なオプション:• market• limit |
status | 状態列挙型利用可能なオプション:• active• completed• partially_completed• cancelled• expired• failed |
created_at | 作成日時 |
current_rate | 現在のレート |
limit | 限度額(タイプが「限度」の場合のみ) |
expires_at | 限度の有効期限 |
completed_at | 注文完了日時(注文が完了した場合のみ) |
意味
変換ID意味
変換元の金額意味
変換先の金額意味
実行された金額(先)意味
実行された金額(元)意味
変換通貨元意味
変換通貨先意味
列挙型利用可能なオプション:- market- limit意味
状態列挙型利用可能なオプション:- active- completed- partially_completed- cancelled- expired- failed意味
作成日時意味
現在のレート意味
限度額(タイプが「限度」の場合のみ)意味
限度の有効期限意味
注文完了日時(注文が完了した場合のみ)
応答の例
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}
コピー