Skip to content

Commit c461b15

Browse files
authored
Merge pull request #159 from KomodoPlatform/postman-update
rename postman collection
2 parents 236b848 + 6f2128c commit c461b15

File tree

4 files changed

+413
-229
lines changed

4 files changed

+413
-229
lines changed

filepathSlugs.json

+2
Original file line numberDiff line numberDiff line change
@@ -2290,6 +2290,8 @@
22902290
"examples",
22912291
"command-by-number",
22922292
"response-by-number-success",
2293+
"command-by-number-exclude-own-orders",
2294+
"response-by-number-success-2",
22932295
"command-by-volume",
22942296
"response-by-volume-success",
22952297
"error-responses"

postman/collections/mm2_dev.postman_collection.json postman/collections/komodo_defi.postman_collection.json

+294-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"info": {
3-
"_postman_id": "9621b583-2009-472c-96ea-9a907d86ac77",
4-
"name": "mm2_dev",
3+
"_postman_id": "01b1b7d4-48d2-414d-b721-e1e7ea1c2c3a",
4+
"name": "komodo_defi",
5+
"description": "Komodo DeFi Framework RPC methods",
56
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
6-
"_exporter_id": "16279216"
7+
"_exporter_id": "12719479"
78
},
89
"item": [
910
{
@@ -16,7 +17,46 @@
1617
"name": "Electrum",
1718
"item": [
1819
{
19-
"name": "electrum UTXO",
20+
"name": "electrum (UTXO TCP/SSL)",
21+
"event": [
22+
{
23+
"listen": "prerequest",
24+
"script": {
25+
"exec": [
26+
"// Strip JSON Comments\r",
27+
"const rawData = pm.request.body.toString();\r",
28+
"const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r",
29+
"\r",
30+
"pm.request.body.update(strippedData);"
31+
],
32+
"type": "text/javascript"
33+
}
34+
}
35+
],
36+
"request": {
37+
"method": "POST",
38+
"header": [
39+
{
40+
"key": "Content-Type",
41+
"value": "application/json",
42+
"type": "text"
43+
}
44+
],
45+
"body": {
46+
"mode": "raw",
47+
"raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"method\": \"electrum\",\r\n \"coin\": \"DOC\",\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:10017\"\r\n // \"protocol\": \"TCP\" // Accepted values: \"TCP\", \"SSL\", \"WS\", \"WSS\"\r\n // \"disable_cert_verification\": false\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:10017\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:10017\"\r\n }\r\n ]\r\n // \"mm2\": null, // Required only if: Not in Coin Config // Accepted values: 0, 1\r\n // \"tx_history\": false,\r\n // \"required_confirmations\": 1, // Default: Coin Config\r\n // \"requires_notarization\": false, // Default: Coin Config\r\n // \"address_format\": {\r\n // \"format\": \"standard\" // Accepted values: \"standard\", \"segwit\", \"cashaddress\"\r\n // // \"network\": \"bchtest\" // Required only if: \"format\": \"cashaddress\"\r\n // }, // Default: Coin Config\r\n // \"utxo_merge_params\": null,\r\n // // \"utxo_merge_params\": {\r\n // // \"merge_at\":50\r\n // // // \"check_every\":10,\r\n // // // \"max_merge_at_once\":100\r\n // // },\r\n // \"check_utxo_maturity\": false,\r\n // \"priv_key_policy\": \"IguanaPrivKey\", // Accepted values: \"IguanaPrivKey\", \"Trezor\"\r\n // \"gap_limit\": 20, // used only if: \"priv_key_policy\": \"Trezor\"\r\n // \"scan_policy\": \"scan_if_new_wallet\" // Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\" // used only if: \"priv_key_policy\": \"Trezor\"\r\n}\r\n"
48+
},
49+
"url": {
50+
"raw": "{{address}}",
51+
"host": [
52+
"{{address}}"
53+
]
54+
}
55+
},
56+
"response": []
57+
},
58+
{
59+
"name": "electrum (UTXO WSS)",
2060
"event": [
2161
{
2262
"listen": "prerequest",
@@ -330,7 +370,8 @@
330370
"host": [
331371
"{{address}}"
332372
]
333-
}
373+
},
374+
"description": "Disables the selected coin."
334375
},
335376
"response": []
336377
},
@@ -774,7 +815,8 @@
774815
"host": [
775816
"{{address}}"
776817
]
777-
}
818+
},
819+
"description": "Returns the confirmed and unconfirmed balance of the requested coin."
778820
},
779821
"response": []
780822
},
@@ -2317,7 +2359,7 @@
23172359
]
23182360
},
23192361
{
2320-
"name": "mm2 Info",
2362+
"name": "Utility",
23212363
"item": [
23222364
{
23232365
"name": "help",
@@ -4357,7 +4399,7 @@
43574399
],
43584400
"body": {
43594401
"mode": "raw",
4360-
"raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"best_orders\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"action\": \"buy\", // Accepted values: \"buy\", \"sell\"\r\n \"request_by\": {\r\n \"type\": \"volume\", // Accepted values: \"volume\", \"number\"\r\n \"value\": 1.1 // Accepted values: Decimals if \"type\": \"volume\", Unsigned Integers if \"type\": \"number\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}"
4402+
"raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"best_orders\",\r\n \"params\": {\r\n \"coin\": \"DOC\",\r\n \"exclude_mine\": true, // Accepted values: \"true\", \"false\". Defaults to false.,\r\n \"action\": \"buy\", // Accepted values: \"buy\", \"sell\"\r\n \"request_by\": {\r\n \"type\": \"volume\", // Accepted values: \"volume\", \"number\"\r\n \"value\": 1.1 // Accepted values: Decimals if \"type\": \"volume\", Unsigned Integers if \"type\": \"number\"\r\n }\r\n }\r\n // \"id\": null // Accepted values: Integers\r\n}"
43614403
},
43624404
"url": {
43634405
"raw": "{{address}}",
@@ -7297,6 +7339,250 @@
72977339
]
72987340
}
72997341
]
7342+
},
7343+
{
7344+
"name": "HD Wallet",
7345+
"item": [
7346+
{
7347+
"name": "task_enable_utxo",
7348+
"item": [
7349+
{
7350+
"name": "init DOC (wss)",
7351+
"event": [
7352+
{
7353+
"listen": "prerequest",
7354+
"script": {
7355+
"exec": [
7356+
"// Strip JSON Comments\r",
7357+
"const rawData = pm.request.body.toString();\r",
7358+
"const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r",
7359+
"\r",
7360+
"pm.request.body.update(strippedData);"
7361+
],
7362+
"type": "text/javascript"
7363+
}
7364+
}
7365+
],
7366+
"request": {
7367+
"method": "POST",
7368+
"header": [
7369+
{
7370+
"key": "Content-Type",
7371+
"value": "application/json",
7372+
"type": "text"
7373+
}
7374+
],
7375+
"body": {
7376+
"mode": "raw",
7377+
"raw": "\r\n {\r\n \"userpass\": \"testpsw\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum3.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n }\r\n ]\r\n }\r\n },\r\n \"scan_policy\": \"scan_if_new_wallet\",\r\n \"min_addresses_number\": 3,\r\n \"gap_limit\": 20\r\n }\r\n }\r\n }"
7378+
},
7379+
"url": {
7380+
"raw": "{{address}}",
7381+
"host": [
7382+
"{{address}}"
7383+
]
7384+
}
7385+
},
7386+
"response": []
7387+
},
7388+
{
7389+
"name": "init DOC (wss, hd)",
7390+
"event": [
7391+
{
7392+
"listen": "prerequest",
7393+
"script": {
7394+
"exec": [
7395+
"// Strip JSON Comments\r",
7396+
"const rawData = pm.request.body.toString();\r",
7397+
"const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r",
7398+
"\r",
7399+
"pm.request.body.update(strippedData);"
7400+
],
7401+
"type": "text/javascript"
7402+
}
7403+
}
7404+
],
7405+
"request": {
7406+
"method": "POST",
7407+
"header": [
7408+
{
7409+
"key": "Content-Type",
7410+
"value": "application/json",
7411+
"type": "text"
7412+
}
7413+
],
7414+
"body": {
7415+
"mode": "raw",
7416+
"raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n }\r\n ]\r\n }\r\n },\r\n \"path_to_address\": { // defaults to 0'/0/0\r\n \"account_id\": 0,\r\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n \"address_id\": 1\r\n },\r\n \"tx_history\": true, // defaults to false\r\n \"gap_limit\": 20, // Optional, defaults to 20 \r\n \"scan_policy\": \"scan_if_new_wallet\", // Optional, defaults to \"scan_if_new_wallet\", Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\"\r\n \"min_addresses_number\": 3 // Optional, Number of addresses to generate, if not specified addresses will be generated up to path_to_address::address_index\r\n }\r\n }\r\n}"
7417+
},
7418+
"url": {
7419+
"raw": "{{address}}",
7420+
"host": [
7421+
"{{address}}"
7422+
]
7423+
}
7424+
},
7425+
"response": []
7426+
},
7427+
{
7428+
"name": "init DOC (wss, trezor)",
7429+
"event": [
7430+
{
7431+
"listen": "prerequest",
7432+
"script": {
7433+
"exec": [
7434+
"// Strip JSON Comments\r",
7435+
"const rawData = pm.request.body.toString();\r",
7436+
"const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r",
7437+
"\r",
7438+
"pm.request.body.update(strippedData);"
7439+
],
7440+
"type": "text/javascript"
7441+
}
7442+
}
7443+
],
7444+
"request": {
7445+
"method": "POST",
7446+
"header": [
7447+
{
7448+
"key": "Content-Type",
7449+
"value": "application/json",
7450+
"type": "text"
7451+
}
7452+
],
7453+
"body": {
7454+
"mode": "raw",
7455+
"raw": "\r\n {\r\n \"userpass\": \"testpsw\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum3.cipig.net:30020\",\r\n \"protocol\": \"WSS\"\r\n }\r\n ]\r\n }\r\n },\r\n \"scan_policy\": \"scan_if_new_wallet\",\r\n \"min_addresses_number\": 3,\r\n \"priv_key_policy\": \"Trezor\",\r\n \"gap_limit\": 20\r\n }\r\n }\r\n }"
7456+
},
7457+
"url": {
7458+
"raw": "{{address}}",
7459+
"host": [
7460+
"{{address}}"
7461+
]
7462+
}
7463+
},
7464+
"response": []
7465+
},
7466+
{
7467+
"name": "init DOC (tcp)",
7468+
"event": [
7469+
{
7470+
"listen": "prerequest",
7471+
"script": {
7472+
"exec": [
7473+
"// Strip JSON Comments\r",
7474+
"const rawData = pm.request.body.toString();\r",
7475+
"const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r",
7476+
"\r",
7477+
"pm.request.body.update(strippedData);"
7478+
],
7479+
"type": "text/javascript"
7480+
}
7481+
}
7482+
],
7483+
"request": {
7484+
"method": "POST",
7485+
"header": [
7486+
{
7487+
"key": "Content-Type",
7488+
"value": "application/json",
7489+
"type": "text"
7490+
}
7491+
],
7492+
"body": {
7493+
"mode": "raw",
7494+
"raw": "\r\n {\r\n \"userpass\": \"testpsw\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum3.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n }\r\n },\r\n \"scan_policy\": \"scan_if_new_wallet\",\r\n \"min_addresses_number\": 3,\r\n \"gap_limit\": 20\r\n }\r\n }\r\n }"
7495+
},
7496+
"url": {
7497+
"raw": "{{address}}",
7498+
"host": [
7499+
"{{address}}"
7500+
]
7501+
}
7502+
},
7503+
"response": []
7504+
},
7505+
{
7506+
"name": "init DOC (tcp, hd)",
7507+
"event": [
7508+
{
7509+
"listen": "prerequest",
7510+
"script": {
7511+
"exec": [
7512+
"// Strip JSON Comments\r",
7513+
"const rawData = pm.request.body.toString();\r",
7514+
"const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r",
7515+
"\r",
7516+
"pm.request.body.update(strippedData);"
7517+
],
7518+
"type": "text/javascript"
7519+
}
7520+
}
7521+
],
7522+
"request": {
7523+
"method": "POST",
7524+
"header": [
7525+
{
7526+
"key": "Content-Type",
7527+
"value": "application/json",
7528+
"type": "text"
7529+
}
7530+
],
7531+
"body": {
7532+
"mode": "raw",
7533+
"raw": "{\r\n \"userpass\": \"{{userpass}}\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum1.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum2.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n },\r\n {\r\n \"url\": \"electrum3.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n }\r\n },\r\n \"path_to_address\": { // defaults to 0'/0/0\r\n \"account_id\": 0,\r\n \"chain\": \"External\", // Accepted values: \"External\", \"Internal\"\r\n \"address_id\": 1\r\n },\r\n \"tx_history\": true, // defaults to false\r\n \"gap_limit\": 20, // Optional, defaults to 20 \r\n \"scan_policy\": \"scan_if_new_wallet\", // Optional, defaults to \"scan_if_new_wallet\", Accepted values: \"do_not_scan\", \"scan_if_new_wallet\", \"scan\"\r\n \"min_addresses_number\": 3 // Optional, Number of addresses to generate, if not specified addresses will be generated up to path_to_address::address_index\r\n }\r\n }\r\n}"
7534+
},
7535+
"url": {
7536+
"raw": "{{address}}",
7537+
"host": [
7538+
"{{address}}"
7539+
]
7540+
}
7541+
},
7542+
"response": []
7543+
},
7544+
{
7545+
"name": "init DOC (tcp, trezor)",
7546+
"event": [
7547+
{
7548+
"listen": "prerequest",
7549+
"script": {
7550+
"exec": [
7551+
"// Strip JSON Comments\r",
7552+
"const rawData = pm.request.body.toString();\r",
7553+
"const strippedData = rawData.replace(/\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\/)/g, (m, g) => g ? \"\" : m)\r",
7554+
"\r",
7555+
"pm.request.body.update(strippedData);"
7556+
],
7557+
"type": "text/javascript"
7558+
}
7559+
}
7560+
],
7561+
"request": {
7562+
"method": "POST",
7563+
"header": [
7564+
{
7565+
"key": "Content-Type",
7566+
"value": "application/json",
7567+
"type": "text"
7568+
}
7569+
],
7570+
"body": {
7571+
"mode": "raw",
7572+
"raw": "\r\n {\r\n \"userpass\": \"testpsw\",\r\n \"mmrpc\": \"2.0\",\r\n \"method\": \"task::enable_utxo::init\",\r\n \"params\": {\r\n \"ticker\": \"DOC\",\r\n \"activation_params\": {\r\n \"mode\": {\r\n \"rpc\": \"Electrum\",\r\n \"rpc_data\": {\r\n \"servers\": [\r\n {\r\n \"url\": \"electrum3.cipig.net:20020\",\r\n \"protocol\": \"SSL\"\r\n }\r\n ]\r\n }\r\n },\r\n \"scan_policy\": \"scan_if_new_wallet\",\r\n \"min_addresses_number\": 3,\r\n \"priv_key_policy\": \"Trezor\",\r\n \"gap_limit\": 20\r\n }\r\n }\r\n }"
7573+
},
7574+
"url": {
7575+
"raw": "{{address}}",
7576+
"host": [
7577+
"{{address}}"
7578+
]
7579+
}
7580+
},
7581+
"response": []
7582+
}
7583+
]
7584+
}
7585+
]
73007586
}
73017587
]
73027588
}

0 commit comments

Comments
 (0)