Index

Index

Brief description

  • index list

Request URL

  • /api/defi/option/index

Method

  • GET

Return parameter

Name
Type
Explain

index_no

int

index id

index_price

string

current index

init_price

string

open index

name

string

underlying name

Return example

{
    "code": 0,
    "data": [
        {
            "index_no": 3,
            "created_at": "2021-06-19 08:04:31",
            "updated_at": "2021-06-19 08:04:31",
            "tokens": "ETH,BTC,DOT",
            "weights": "20,30,50",
            "priority": 0,
            "name": "ETH  20%+BTC  30%+DOT  50%",
            "index_price": "99.61281789",
            "init_price": "99.91505610",
            "is_open": 1,
            "k": "13053661328",
            "circle_supplies": "100000000000000,100000000000000,100000000000000"
        }
    ],
    "extra": null
}

Brief description

  • trend

Request URL

  • /api/defi/option/index/trend

Method

  • GET

Request parameter

Name
Required
Type
Explain

index_no

yes

string

3

type

yes

string

type【1-1min,2-5min,3-15min,4-30min,5-60min,6-5h,7-day,8-week】

start_time

no

string

e.g.,2021-06-21 03:47:00

end_time

no

string

e.g.,2021-07-21 03:47:00

Return parameter

Name
Type
Explain

id

int

index trend id

datetime

string

time

index_price

string

index price

Return example

  {
    "code": 0,
    "data": [
        {
            "id": 1,
            "datetime": "2021-06-21 03:47:00",
            "index_price": "98.75437726"
        },
        {
            "id": 2,
            "datetime": "2021-06-21 03:48:00",
            "index_price": "98.75437726"
        },
    ],
    "extra": null
}

Brief description

  • kind of payment tokens

RequestURL

  • /api/defi/option/index/tokens

Method

  • GET

Return parameter

Name
Type
Explain

token_id

int

primary key

name

string

token name

Return example

{
	"code": 0,
	"data": [
		{
			"token_id": 5,
			"created_at": "2021-05-10 20:23:00",
			"updated_at": "2021-05-10 20:23:00",
			"address": "0x07de306FF27a2B630B1141956844eB1552B956B5",
			"name": "USDT",
			"decimals": 6,
			"is_pay_token": 1
		}
	],
	"extra": null
}

Brief description

  • fund pools list

Request URL

  • /api/defi/option/index/pools

Method

  • GET

Parameter

Name
Required
Type
Explain

index_no

yes

string

index_no

Return parameter

Name
Type
Explain

id

int

primary key

index_no

int

index id

pool_id

int

pool No.

knockout_ratio

string

knockout range

execute_day

int

exercise time

call_price

string

buy price【call】

put_price

string

buy price【put】

balance

string

market maker margin

index_name

string

underlying name

index_price

string

start price

Return example

{
	"code": 0,
	"data": [
		{
			"id": 1,
			"index_no": 3,
			"pool_id": 0,
			"knockout_ratio": "5.00",
			"execute_day": 1,
			"call_price": "0.000000000000000000",
			"put_price": "0.000000000000000000",
			"balance": "0.000000000000000000",
			"created_at": "2021-06-21 04:07:16",
			"updated_at": "2021-06-21 04:07:16",
			"is_open": 1,
			"index_name": "ETH  20%+BTC  30%+DOT  50%",
			"index_price": "97.59269696"
		}
	],
	"extra": null
}

Last updated