max_maker_vol
The max_maker_vol method returns the maximum volume of a coin which can be used to create a maker order (taking into account estimated fees). If the coin is not activated, a NoSuchCoin error will be returned.
Arguments
| Parameter | Type | Description |
|---|---|---|
| coin | string | The ticker of the coin you want to query. |
Response
| Parameter | Type | Description |
|---|---|---|
| coin | string | The ticker of the coin you queried. |
| volume | object | A standard NumericFormatsValue object representing the tradable maker volume. |
| balance | object | A standard NumericFormatsValue object representing the tradable taker balance. |
| locked_by_swaps | object | A standard NumericFormatsValue object representing the volume of a coin’s balance which is locked by swaps in progress. |
📌 Examples
Command
POST max_maker_vol
{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "max_maker_vol",
"params": {
"coin": "DOC"
}
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "max_maker_vol",
"params": {
"coin": "DOC"
}
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "max_maker_vol",
"params": {
"coin": "DOC"
}
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "max_maker_vol",
"params": {
"coin": "DOC"
}
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json()); <?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "max_maker_vol",
"params": {
"coin": "DOC"
}
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response; package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","mmrpc":"2.0","method":"max_maker_vol","params":{"coin":"DOC"}}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
} require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "max_maker_vol",
"params": {
"coin": "DOC"
}
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Response
Response (success)
{
"mmrpc": "2.0",
"result": {
"coin": "MARTY",
"volume": {
"decimal": "4.489763268712998712998712998712998712998712998712998712998712998712998712998712998712998712998712999",
"rational": [
[1, [962255003, 81]],
[1, [390588672, 18]]
],
"fraction": {
"numer": "348854605979",
"denom": "77700000000"
}
},
"balance": {
"decimal": "5.49110027",
"rational": [
[1, [549110027]],
[1, [100000000]]
],
"fraction": {
"numer": "549110027",
"denom": "100000000"
}
},
"locked_by_swaps": {
"decimal": "1.001317001287001287001287001287001287001287001287001287001287001287001287001287001287001287001287001",
"rational": [
[1, [77802331]],
[1, [77700000]]
],
"fraction": {
"numer": "77802331",
"denom": "77700000"
}
}
},
"id": null
}Response (error)
{
"mmrpc": "2.0",
"error": "No such coin TIME",
"error_path": "max_maker_vol_rpc.lp_coins",
"error_trace": "max_maker_vol_rpc:140] lp_coins:2894]",
"error_type": "NoSuchCoin",
"error_data": {
"coin": "TIME"
},
"id": null
}Response (balance too low)
{
"mmrpc": "2.0",
"error": "Not enough QTUM for swap: available 0, required at least 0.000728, locked by swaps None",
"error_path": "max_maker_vol_rpc.maker_swap.utxo_common",
"error_trace": "max_maker_vol_rpc:148] maker_swap:2203] utxo_common:3327] utxo_common:892]",
"error_type": "NotSufficientBalance",
"error_data": {
"coin": "QTUM",
"available": "0",
"required": "0.000728"
},
"id": null
}Response (Transport error)
{
"mmrpc": "2.0",
"error": "Transport error: JsonRpcError { client_info: 'coin: tBTC', request: JsonRpcRequest { jsonrpc: '2.0', id: '31', method: 'blockchain.estimatefee', params: [Number(1), String('ECONOMICAL')] }, error: Transport('rpc_clients:1237] rpc_clients:1239] ['rpc_clients:2047] common:1385] future timed out']') }",
"error_path": "taker_swap.utxo_common",
"error_trace": "taker_swap:1599] utxo_common:1990] utxo_common:166]",
"error_type": "Transport",
"error_data": "JsonRpcError { client_info: 'coin: tBTC', request: JsonRpcRequest { jsonrpc: '2.0', id: '31', method: 'blockchain.estimatefee', params: [Number(1), String('ECONOMICAL')] }, error: Transport('rpc_clients:1237] rpc_clients:1239] ['rpc_clients:2047] common:1385] future timed out']') }",
"id": 0
}