Price
Price
Buy option sign
/api/defi/option/order/buy-sign
Method
POST
Parameter
Parameter name
Required
Type
Explain
index_no
Yes
uint256
index_no
pool_id
Yes
uint8
pool_id
is_call
Yes
0,1
1:is call option,0:is put option
Return example
{
"code": 0,
"data": {
"signData": "0x95c67f60990b48a3999faa1a9ec79fbd39d04664cc52515692ac88ad49ec22585fe1bd7fa768fa846f2c8af97c7bd76aa5434aefb53631de053f543ea73a26501c",
"price": "242172",
"datetime": 1625577506
},
"extra": null
}
Return parameter description
Parameter name
Type
Explain
signData
bytes
signature date
datetime
int
sign time
price
int
price,accuracy is divided 10^6
Remark
The signature time is about 40 seconds longer than the current time, within which options can be purchased by submitting to the blockchain
Sell option sign
/api/defi/option/order/sell-sign
Method
POST
Parameter
Parameter name
Required
Type
Explain
index_no
Yes
uint256
index_no
pool_id
Yes
uint8
pool_id
order_no
Yes
int
order_no
Return example
{
"code": 0,
"data": {
"signData": "0x95c67f60990b48a3999faa1a9ec79fbd39d04664cc52515692ac88ad49ec22585fe1bd7fa768fa846f2c8af97c7bd76aa5434aefb53631de053f543ea73a26501c",
"price": "242172",
"datetime": 1625577506
},
"extra": null
}
Return parameter description
Parameter name
Type
Explain
signData
bytes
sign date
datetime
int
sign time
price
int
price,accuracy is divided 10^6
Remark
The signature time is about 40 seconds longer than the current time, within which options can be purchased by submitting to the blockchain
Token list
/api/defi/oracle/token/price
Method
POST
Return example
{
"code": 0,
"data": [
{
"token_id": 1,
"created_at": "2021-05-10 20:23:00",
"updated_at": "2021-05-10 20:23:00",
"address": "0x0000000000000000000000000000000000000000",
"name": "ETH",
"symbol": "//demo.cleardao.com/static/image/ethereum.png",
"decimals": 18,
"is_pay_token": 0,
"price": "2281.8246"
}
]
}
Last updated