# orderbook
orderbook base rel
The orderbook
method requests from the network the currently available orders for the specified trading pair.
# Arguments
Structure | Type | Description |
---|---|---|
base | string | base currency of a pair |
rel | string | related" currency, also can be called "quote currency" according to exchange terms |
# Response
Structure | Type | Description |
---|---|---|
asks | array of Order | an array of objects containing outstanding asks |
bids | array of Order | an array of objects containing outstanding bids |
numbids | number | the number of outstanding bids |
biddepth | number | deprecated |
base | string | the name of the coin the user desires to receive |
rel | string | the name of the coin the user will trade |
timestamp | number | the timestamp of the orderbook request |
netid | number | the id of the network on which the request is made (default is 0 ) |
total_asks_base_vol | string (decimal) | the base volumes sum of all asks |
total_asks_base_vol_rat | rational | the total_asks_base_vol in num-rational crate format |
total_asks_base_vol_fraction | fraction | the total_asks_base_vol represented as an object |
total_asks_rel_vol | string (decimal) | the rel volumes sum of all asks |
total_asks_rel_vol_rat | rational | the total_asks_rel_vol in num-rational crate format |
total_asks_rel_vol_fraction | fraction | the total_asks_rel_vol represented as an object |
total_bids_base_vol | string (decimal) | the base volumes sum of all bids |
total_bids_base_vol_rat | rational | the total_bids_base_vol in num-rational crate format |
total_bids_base_vol_fraction | fraction | the total_bids_base_vol represented as an object |
total_bids_rel_vol | string (decimal) | the rel volumes sum of all bids |
total_bids_rel_vol_rat | rational | the total_bids_rel_vol in num-rational crate format |
total_bids_rel_vol_fraction | fraction | the total_bids_rel_vol represented as an object |
Where Order
object structure is as follows
Structure | Type | Description |
---|---|---|
coin | string | the name of the base coin; the user desires this |
address | string | the address offering the trade |
price | string (decimal) | the price in rel the user is willing to pay per one unit of the base coin |
price_rat | rational | the price in num-rational crate format |
price_fraction | object (rational) | the price represented as an object |
maxvolume | string (decimal) | the maximum amount of base coin the offer provider is willing to sell |
max_volume_rat | rational | the max volume in num-rational crate format |
max_volume_fraction | object (rational) | the max volume represented as an object |
min_volume | string (decimal) | the minimum amount of base coin the offer provider is willing to sell |
min_volume_rat | rational | the min volume in num-rational crate format |
min_volume_fraction | object (rational) | the min volume represented as an object |
pubkey | string | the pubkey of the offer provider |
age | number | the age of the offer (in seconds) |
zcredits | number | the zeroconf deposit amount |
numasks | number | the total number of asks |
askdepth | number | the depth of the ask requests |
uuid | string | the uuid of order |
is_mine | bool | whether the order is placed by me |
base_confs | number | the confirmations settings of base coin set by the offer provider |
base_nota | bool | the notarisation settings of base coin set by the offer provider |
base_max_volume | string (decimal) | the maximum amount of base coin the offer provider is willing to buy or sell |
base_max_volume_rat | rational | the base max volume in num-rational crate format |
base_max_volume_fraction | object (rational) | the base max volume represented as an object |
base_min_volume | string (decimal) | the minimum amount of base coin the offer provider is willing to buy or sell |
base_min_volume_rat | rational | the base min volume in num-rational crate format |
base_min_volume_fraction | object (rational) | the base min volume represented as an object |
rel_confs | number | the confirmations settings of rel coin set by the offer provider |
rel_nota | bool | the notarisation settings of rel coin set by the offer provider |
rel_max_volume | string (decimal) | the maximum amount of rel coin the offer provider is willing to buy or sell |
rel_max_volume_rat | rational | the rel max volume in num-rational crate format |
rel_max_volume_fraction | object (rational) | the rel max volume represented as an object |
rel_min_volume | string (decimal) | the minimum amount of rel coin the offer provider is willing to buy or sell |
rel_min_volume_rat | rational | the rel min volume in num-rational crate format |
rel_min_volume_fraction | object (rational) | the rel min volume represented as an object |
base_max_volume_aggr | string (decimal) | the base max volume aggregated at the price level; the sum of base volumes of the current order and all orders with a worse price |
base_max_volume_aggr_rat | rational | the base_max_volume_aggr in num-rational crate format |
base_max_volume_aggr_fraction | object (rational) | the base_max_volume_aggr represented as an object |
rel_max_volume_aggr | string (decimal) | the rel max volume aggregated at the price level; the sum of rel volumes of the current order and all orders with a worse price |
rel_max_volume_aggr_rat | rational | the rel_max_volume_aggr in num-rational crate format |
rel_max_volume_aggr_fraction | object (rational) | the rel_max_volume_aggr represented as an object |
# 📌 Examples
# Command
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"orderbook\",\"base\":\"HELLO\",\"rel\":\"WORLD\"}"