ClearDAO FAQ
  • Getting Started
    • How it Works
    • Product
    • Roadmap
    • Team
    • ClearDAO Token
    • ClearDAO Token Bridge
    • Contact
  • Development Resources
    • SDK
      • ClearDAO Developer Guide
      • Deploy Contracts
        • Options and Notes
          • Quick Start
          • Configure Contract
          • Contract Upgrade
          • Contract Address
        • TRS
      • Configure Contract Parameters
      • Interact With Contracts
        • Options
        • Notes
        • TRS
        • CDS
          • README
          • CDS Buyer
          • Challenger
          • Liquidity Provider
          • Ticket
          • Ticket Market
          • Ticket Sale
          • Seller
      • Contract Reference
        • Oracle
        • Index Contract
        • Option Contract
        • Market Maker Contract
        • Note Contract
      • APIs
        • CDS
          • Config
          • Ticket
          • Ticket Sale
          • Transaction
          • CDS Market
          • Issue CDS
          • CDS Category
          • Ticket Market
        • Options and Notes
          • Configure
          • Price
          • User
          • Index
          • Option Parameter Configuration
          • Faucet
          • Market Maker
        • TRS
        • CLEARIndex
    • Barrier Options
    • NFT Marketplace
    • ClearIndex
  • Governance
    • CLH Staking Module
Powered by GitBook
On this page
  • Price
  • Buy option sign
  • Method
  • Parameter
  • Return example
  • Return parameter description
  • Remark
  • Sell option sign
  • Method
  • Parameter
  • Return example
  • Return parameter description
  • Remark
  • Token list
  • Method
  • Return example
  1. Development Resources
  2. SDK
  3. APIs
  4. Options and Notes

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"
    }
   ]
}
PreviousConfigureNextUser

Last updated 1 year ago