지정가 주문 생성

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열거형 유형사용 가능한 옵션 :marketlimit
status상태 열거형사용 가능한 옵션 :activecompletedpartially_completedcancelledexpiredfailed
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}
복사