# best_orders

best_orders coin action volume

The best_orders method returns the best price orders that can fill the volume for all existing pairs with selected coin.

TIP

The response of this method can contain coins that are not activated on the AtomicDEX API instance. Activation will be required to proceed with the trade.

# Arguments

Structure Type Description
coin string the ticker of the coin to get best orders
action string whether to buy or sell the selected coin
volume string the amount of coin user is willing to buy or sell

# Response

Structure Type Description
result object (map) the ticker -> array of order entries map

where order entry has the following structure

Structure Type Description
coin string the ticker of the coin
address string the address offering the trade
price string (decimal) the price the user is willing to buy or sell per one unit of the coin from request
price_rat rational the price in num-rational crate format
price_fraction object (fraction) the price represented as an object
maxvolume string (decimal) the maximum amount of base 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 (deprecated)
netid number the id of the network on which the request is made (default is 0)
uuid string the uuid of order
is_mine bool whether the order is placed by me
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_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 max volume in num-rational crate format
rel_max_volume_fraction object (rational) the rel_max_volume 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
original_tickers list (string) Tickers included in response when orderbook_ticker is configured for the queried coin in coins file

# 📌 Examples

# Command

curl --url "http://127.0.0.1:7783" --data "{
  \"userpass\":\"$userpass\",
  \"method\": \"best_orders\",
  \"coin\": \"BTC\",
  \"action\": \"buy\",
  \"volume\": \"1\"
}"