Market Maker
Market maker
Brief description
index list
Request URL
/api/defi/option/maker/index
Method
GET
Parameter
Return Parameter
index_no
int
index id
index_price
string
current index
init_price
string
open index
name
string
underlying index
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": "97.59269696",
"init_price": "99.91505610",
"is_open": 1,
"k": "13053661328",
"circle_supplies": "100000000000000,100000000000000,100000000000000"
}
],
"extra": null
}
Brief description
deposit /withdraw margin
Request URL
/api/defi/option/maker/pools
Method
GET
Request parameter
maker_address
yes
string
market maker address
index_no
yes
int
index id
Return parameter
id
int
primary key
index_no
int
index id
pool_id
int
pool No.
knockout_ratio
string
knockout range
exercise_day
int
exercise cycle
balance
string
margin(unfrozen)
deduction
string
margin(deduction)
total_injection
string
margin(total amount of deposit)
position
int
options shares have been sold
is_open
int
status【0offline 1online】offline cannot deposit margin
Return example
{
"code": 0,
"data": [
{
"id": 1,
"index_no": 3,
"pool_id": 0,
"knockout_ratio": "5.00",
"exercise_day": 1,
"pay_token": "USDT",
"call_price": "0.000000000000000000",
"put_price": "0.000000000000000000",
"balance": null,
"created_at": "2021-06-21 04:07:16",
"updated_at": "2021-06-21 04:07:16",
"deduction": null,
"total_injection": "0.000000000000000000",
"is_open": 1,
"position": 0
}
],
"extra": null
}
Brief description
view pool information
Request URL
/api/defi/option/maker/pool-info
Method
GET
Parameter
pool_id
yes
int
pool_id on list
index_no
yes
int
index_no on list
id
yes
int
id on list
Return parameter
id
int
pramiry key
index_no
int
index id
pool_id
int
pool No.
knockout_ratio
string
knockout range
exercise_day
int
exercise cycle
balance
string
margin(unfrozen)
deduction
string
margin(deduction)
total_injection
string
margin(total)
position
int
sold positions
is_open
int
status【0 offline 1online】offline cannot deposit margin
name
string
underlying name
Return example
{
"code": 0,
"data": {
"id": 1,
"maker_address": "11",
"index_no": 3,
"pool_id": 1,
"balance": "1000.000000000000000000",
"deduction": "0.000000000000000000",
"created_at": "2021-06-22 09:41:24",
"updated_at": "2021-06-22 09:41:27",
"name": "ETH 20%+BTC 30%+DOT 50%",
"is_open": 1,
"knockout_ratio": "7.50",
"exercise_day": 1,
"total_injection": "1000.000000000000000000"
},
"extra": null
}
Brief description
orders of sold options
Request URL
/api/defi/option/maker/orders
Method
GET
Parameter
pool_id
yes
int
pool_id on list
index_no
yes
int
index_no on list
maker_address
yes
string
market maker address
page_num
no
int
page number【default 1】
page_size
no
int
number of displays per page【default 10】
Return Parameter
id
int
primary key
index_no
int
index id
pool_id
int
pool No.
start_price
string
start price
is_call
int
direction of options【0put 1call】
position
int
quantity of purchase
maker_fund
string
get corresponding amount
margin
string
Deduct corresponding margin
exercise_time
string
exercise time
exercise_day
int
exercise cycle
status
int
status【1waiting liquidation ,2 exercised,3 knockouted】
trans_hash
string
hash
current_page
int
current page number
total
int
total page number
Return example
{
"code": 0,
"data": {
"current_page": 1,
"data": [
{
"id": 1,
"index_no": 3,
"pool_id": 1,
"order_no": 1,
"oid": 1,
"maker_address": "11",
"margin": "10.000000000000000000",
"income": "20.000000000000000000",
"created_at": null,
"updated_at": null,
"order_position": 1000,
"is_call": 1,
"maker_margin": "10000.000000000000000000",
"price": "100.000000000000000000",
"status": 1,
"maker_income": "1.000000000000000000",
"exercise_time": 11,
"start_price": "1.00000000",
"position": 1000,
"trans_hash": "",
"maker_fund": "0.000000000000000000"
}
],
"first_page_url": "http://vagrant.clear2.com/api/option/maker/orders?=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://vagrant.clear2.com/api/option/maker/orders?=1",
"next_page_url": null,
"path": "http://vagrant.clear2.com/api/option/maker/orders",
"per_page": 10,
"prev_page_url": null,
"to": 2,
"total": 2
},
"extra": null
}
Brief description
profits
Request URL
/api/defi/option/maker/profits
Method
GET
Parameter
index_no
yes
int
index_no on list
maker_address
yes
string
market maker address
page_num
no
int
page number 【default 1】
page_size
no
int
number of dispalys per page 【default 10】
Return parameter
id
int
id
index_no
int
index id
pool_id
int
pool No.
index_name
string
underlying name
knockout_ratio
string
knockout range
exercise_day
int
exercise cycle
start_price
string
start price
is_call
int
option direction【0put 1call】
exercise_time
string
exercise time
profit
string
profit
status
int
status【1waiting liquadation,2exercised,3knockouted】
trans_hash
string
hash
total
int
total pages
Return example
{
"code":0,
"data":[
{
"id":51,
"index_no":3,
"oid":51,
"pool_id":0,
"order_no":29,
"maker_address":"0xD8a0d684C92CdED2e9CcabA955b5f13a1416BD17",
"margin":"53.126567000000000000",
"income":"55.393321999999999957",
"chain_type":2,
"created_at":"2021-11-11 04:22:54",
"updated_at":"2021-11-13 00:00:54",
"order_position":1,
"is_call":1,
"total_margin":"53.126567000000000000",
"price":"6.849676000000000000",
"status":1,
"maker_income":"55.393322000000000000",
"exercise_time":1636761600,
"start_price":"1062.53134787",
"position":0,
"trans_hash":"0x95455282ff61bd44113fe7bac61c7377bfb17279ad7abd8f6e2905232a4f0d61",
"index_name":"ETH 40% + BTC 40% + DOT 20%",
"exercise_day":1,
"knockout_ratio":"5.00",
"profit":"2.266754999999999957"
}
],
"extra":{
"total":11
}
}
Last updated