Batch Requests
overviewbatch_requests
A batch request is a method for sending several unique requests to the network all at once.
Avoid sending requests that depend on each other. For example, do not send a coin activation and a balance request to that coin in the same batch. Such requests result in non-deterministic behavior, as the Komodo DeFi Framework API may or may not execute the requests in the desired order.
Parameter | Type | Required | Description |
---|---|---|---|
request_objects | array of objects | ✓ | Request objects to be executed in parallel |
Parameter | Type | Description |
---|---|---|
(none) | array of objects | The results, provided in the order of received requests; this may contain null elements |
batch_requests
POST
batch_requests[
{
"method": "electrum",
"coin": "DOC",
"servers": [
{
"url": "electrum1.cipig.net:10020"
},
{
"url": "electrum2.cipig.net:10020"
},
{
"url": "electrum3.cipig.net:10020"
}
],
"userpass": "RPC_UserP@SSW0RD",
"mm2": 1
},
{
"method": "electrum",
"coin": "MARTY",
"servers": [
{
"url": "electrum1.cipig.net:10021"
},
{
"url": "electrum2.cipig.net:10021"
},
{
"url": "electrum3.cipig.net:10021"
}
],
"userpass": "RPC_UserP@SSW0RD",
"mm2": 1
},
{
"method": "electrum",
"coin": "DOC",
"servers": [
{
"url": "electrum1.cipig.net:10020"
},
{
"url": "electrum2.cipig.net:10020"
},
{
"url": "electrum3.cipig.net:10020"
}
],
"userpass": "invalid userpass",
"mm2": 1
}
]