withdraw
withdraw coin to (amount max)
The withdraw method generates, signs, and returns a transaction that transfers the amount of coin to the address indicated in the to argument.
This method generates a raw transaction which should then be broadcast using send_raw_transaction.
| Parameter* = required | Type | Description |
|---|---|---|
| coin* | string | The name of the coin the user desires to withdraw. |
| to* | string | Coins are withdrawn to this address. |
| amount | string (numeric) | Optional. The amount to withdraw; ignored when max=true. |
| fee | object | Optional. A standard FeeInfo object with type-specific fee control. |
| max | boolean | Optional. Withdraw the maximum available amount. |
| Parameter* = required | Type | Description |
|---|---|---|
| coin* | string | The coin of the transaction. |
| fee_details* | object | Fee details of the generated transaction. |
| from* | array of strings | Coins are withdrawn from this address. |
| my_balance_change* | string (numeric) | Expected balance change in my_address after broadcast. |
| received_by_me* | string (numeric) | Amount received by my_address after broadcast. |
| spent_by_me* | string (numeric) | Amount spent by my_address (includes fees). |
| to* | array of strings | Coins are withdrawn to this address. |
| total_amount* | string (numeric) | Total amount transferred. |
| tx_hash* | string | Hash of the generated transaction. |
| kmd_rewards | object | Optional. Accrued rewards information (KMD only). |
| tx_hex | string | Optional. Transaction bytes in hex; used by non-SIA protocols. |
| tx_json | object | Optional. For SIA protocol coins only. The transaction JSON object. |
Withdraw
POST
withdraw{
"amount": "10",
"coin": "KMD",
"method": "withdraw",
"to": "RJTYiYeJ8eVvJ53n2YbrVmxWNNMVZjDGLh",
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"block_height": 0,
"coin": "KMD",
"fee_details": {
"amount": "0.00001",
"type": "Utxo"
},
"from": [
"R9o9xTocqr6CeEDGDH6mEYpwLoMz6jNjMW"
],
"kmd_rewards": {
"amount": "0.0791809",
"claimed_by_my": true
},
"my_balance_change": "-10.00001",
"received_by_me": "0.34417325",
"spent_by_me": "10.34418325",
"to": [
"RJTYiYeJ8eVvJ53n2YbrVmxWNNMVZjDGLh"
],
"total_amount": "10.34418325",
"tx_hash": "3a1c382c50a7d12e4675d12ed7e723ce9f0167693dd75fd772bae8524810e605",
"tx_hex": "0400008085202f890207a8e96978acfb8f0d002c3e4390142810dc6568b48f8cd6d8c71866ad8743c5010000006a47304402201960a7089f2d93480fff68ce0b7ca7bb7a32a52915753ac7ae780abd6162cb1d02202c9b11d442e5f72a532f44ceb10122898d486b1474a10eb981c60c5538b9c82d012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff97f56bf3b0f815bb737b7867e71ddb8198bba3574bb75737ba9c389a4d08edc6000000006a473044022055199d80bd7e2d1b932e54f097c6a15fc4b148d21299dc50067c1da18045f0ed02201d26d85333df65e6daab40a07a0e8a671af9d9b9d92fdf7d7ef97bd868ca545a012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff0200ca9a3b000000001976a91464ae8510aac9546d5e7704e31ce177451386455588acad2a0d02000000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac00000000000000000000000000000000000000"
}
Withdraw
POST
withdraw{
"amount": "1.0",
"coin": "DOC",
"fee": {
"amount": "0.1",
"type": "UtxoFixed"
},
"method": "withdraw",
"to": "R9o9xTocqr6CeEDGDH6mEYpwLoMz6jNjMW",
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"block_height": 0,
"coin": "DOC",
"fee_details": {
"amount": "0.0245",
"coin": "DOC",
"type": "Utxo"
},
"from": [
"RDux85r5XE7xuUs5DCTt7jTY1cJZT7SKAW"
],
"internal_id": "",
"memo": null,
"my_balance_change": "-1.0245",
"received_by_me": "6.5955",
"spent_by_me": "7.62",
"timestamp": 1763194158,
"to": [
"R9o9xTocqr6CeEDGDH6mEYpwLoMz6jNjMW"
],
"total_amount": "7.62",
"transaction_type": "StandardTransfer",
"tx_hash": "7447db586d79b6615077384704f729af4ec2e0fc83614227c041b02a7e167490",
"tx_hex": "0400008085202f8901b55ee690006ab4ace862ad2fe52f75ce0a5334bee9c38e82082b6e569f72248f000000006a4730440220041062aca3a87fd4d0ac656cd4918d9083c9021b8791e75b68b34922ce090fa4022067168f95c48fc96274b5b29e2cf86d025ac6ad1719f8261e18f62ae59289c27701210388533bd49d81742f1598b9048921646f08d06dcd31d38f7e37cca79f64b977c4ffffffff0200e1f505000000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac30ef4f27000000001976a91432d43e7ba0f08d320a22440e55b842407f481ebf88ac2e351869000000000000000000000000000000"
}
{ "error": "utxo:1295] Unsupported input fee type" }
Withdraw
POST
withdraw{
"amount": "1.0",
"coin": "DOC",
"fee": {
"amount": "1",
"type": "UtxoPerKbyte"
},
"method": "withdraw",
"to": "R9o9xTocqr6CeEDGDH6mEYpwLoMz6jNjMW",
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"block_height": 0,
"coin": "DOC",
"fee_details": {
"amount": "0.245",
"coin": "DOC",
"type": "Utxo"
},
"from": [
"RDux85r5XE7xuUs5DCTt7jTY1cJZT7SKAW"
],
"internal_id": "",
"memo": null,
"my_balance_change": "-1.245",
"received_by_me": "6.375",
"spent_by_me": "7.62",
"timestamp": 1763194159,
"to": [
"R9o9xTocqr6CeEDGDH6mEYpwLoMz6jNjMW"
],
"total_amount": "7.62",
"transaction_type": "StandardTransfer",
"tx_hash": "26a801aea65d43de7d41bdadb05252122490b7056dee4becb3f8c40ed359892f",
"tx_hex": "0400008085202f8901b55ee690006ab4ace862ad2fe52f75ce0a5334bee9c38e82082b6e569f72248f000000006a473044022038ca4b1268a05d8d140bbfc4252daa906515f6114739fd7b06052861e35ec2e802201d28953f362e5732865f3db971d77d3d85f02cffc372cd44d2570161e3ac74f301210388533bd49d81742f1598b9048921646f08d06dcd31d38f7e37cca79f64b977c4ffffffff0200e1f505000000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac607aff25000000001976a91432d43e7ba0f08d320a22440e55b842407f481ebf88ac2f351869000000000000000000000000000000"
}
{ "error": "utxo:1295] Unsupported input fee type" }
Withdraw
POST
withdraw{
"amount": 10,
"coin": "ETH",
"method": "withdraw",
"to": "0xbab36286672fbdc7b250804bf6d14be0df69fa28",
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"block_height": 0,
"coin": "ETH",
"fee_details": {
"coin": "ETH",
"gas": 21000,
"gas_price": "0.000000001",
"total_fee": "0.000021",
"type": "Eth"
},
"from": [
"0xbab36286672fbdc7b250804bf6d14be0df69fa29"
],
"my_balance_change": "-10.000021",
"received_by_me": "0",
"spent_by_me": "10.000021",
"to": [
"0xbab36286672fbdc7b250804bf6d14be0df69fa28"
],
"total_amount": "10.000021",
"tx_hash": "8fbc5538679e4c4b78f8b9db0faf9bf78d02410006e8823faadba8e8ae721d60",
"tx_hex": "f86d820a59843b9aca0082520894bab36286672fbdc7b250804bf6d14be0df69fa28888ac7230489e80000801ba0fee87414a3b40d58043a1ae143f7a75d7f47a24e872b638281c448891fd69452a05b0efcaed9dee1b6d182e3215d91af317d53a627404b0efc5102cfe714c93a28"
}
Withdraw
POST
withdraw{
"amount": "AMOUNT",
"coin": "COIN_NAME",
"fee": {
"gas": 55000,
"gas_price": "3.5",
"type": "EthGas"
},
"method": "withdraw",
"to": "RECIPIENT_ADDRESS",
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"block_height": 0,
"coin": "ETH",
"fee_details": {
"coin": "ETH",
"gas": 55000,
"gas_price": "0.0000000035",
"total_fee": "0.0001925",
"type": "Eth"
},
"from": [
"0xbAB36286672fbdc7B250804bf6D14Be0dF69fa29"
],
"internal_id": "",
"my_balance_change": "-0.0001925",
"received_by_me": "10",
"spent_by_me": "10.0001925",
"timestamp": 1566474670,
"to": [
"0xbAB36286672fbdc7B250804bf6D14Be0dF69fa29"
],
"total_amount": "10",
"tx_hash": "a26c4dcacf63c04e385dd973ca7e7ca1465a3b904a0893bcadb7e37681d38c95",
"tx_hex": "f86d820b2884d09dc30082d6d894bab36286672fbdc7b250804bf6d14be0df69fa29888ac7230489e80000801ca0ef0167b0e53ed50d87b6fd630925f2bce6ee72e9b5fdb51c6499a7caaecaed96a062e5cb954e503ff83f2d6ce082649fdcdf8a77c8d37c7d26d46d3f736b228d10"
}
{ "error": "eth:369] Unsupported input fee type" }
Withdraw
POST
withdraw{
"coin": "ETH",
"max": true,
"method": "withdraw",
"to": "0xbab36286672fbdc7b250804bf6d14be0df69fa28",
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"block_height": 0,
"coin": "ETH",
"fee_details": {
"coin": "ETH",
"gas": 21000,
"gas_price": "0.000000001",
"total_fee": "0.000021",
"type": "Eth"
},
"from": [
"0xbab36286672fbdc7b250804bf6d14be0df69fa29"
],
"my_balance_change": "-10.000021",
"received_by_me": "0",
"spent_by_me": "10.000021",
"to": [
"0xbab36286672fbdc7b250804bf6d14be0df69fa28"
],
"total_amount": "10.000021",
"tx_hash": "8fbc5538679e4c4b78f8b9db0faf9bf78d02410006e8823faadba8e8ae721d60",
"tx_hex": "f86d820a59843b9aca0082520894bab36286672fbdc7b250804bf6d14be0df69fa28888ac7230489e80000801ba0fee87414a3b40d58043a1ae143f7a75d7f47a24e872b638281c448891fd69452a05b0efcaed9dee1b6d182e3215d91af317d53a627404b0efc5102cfe714c93a28"
}
Withdraw
POST
withdraw{
"amount": 10,
"coin": "QRC20",
"method": "withdraw",
"to": "qHmJ3KA6ZAjR9wGjpFASn4gtUSeFAqdZgs",
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"block_height": 0,
"coin": "QRC20",
"fee_details": {
"coin": "tQTUM",
"gas_limit": 100000,
"gas_price": 40,
"miner_fee": "0.00000447",
"total_gas_fee": "0.04",
"type": "Qrc20"
},
"from": [
"qXxsj5RtciAby9T7m98AgAATL4zTi4UwDG"
],
"my_balance_change": "-10",
"received_by_me": "0",
"spent_by_me": "10",
"timestamp": 1608725061,
"to": [
"qHmJ3KA6ZAjR9wGjpFASn4gtUSeFAqdZgs"
],
"total_amount": "10",
"tx_hash": "8fbc5538679e4c4b78f8b9db0faf9bf78d02410006e8823faadba8e8ae721d60",
"tx_hex": "f86d820a59843b9aca0082520894bab36286672fbdc7b250804bf6d14be0df69fa28888ac7230489e80000801ba0fee87414a3b40d58043a1ae143f7a75d7f47a24e872b638281c448891fd69452a05b0efcaed9dee1b6d182e3215d91af317d53a627404b0efc5102cfe714c93a28"
}
Withdraw
POST
withdraw{
"amount": 10,
"coin": "QRC20",
"fee": {
"gas_limit": 250000,
"gas_price": 40,
"type": "Qrc20Gas"
},
"method": "withdraw",
"to": "qHmJ3KA6ZAjR9wGjpFAS4gtUSeFAqdZgs",
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"block_height": 0,
"coin": "QRC20",
"fee_details": {
"coin": "tQTUM",
"gas_limit": 250000,
"gas_price": 40,
"miner_fee": "0.00000447",
"total_gas_fee": "0.1",
"type": "Qrc20"
},
"from": [
"qXxsj5RtciAby9T7m98AgAATL4zTi4UwDG"
],
"my_balance_change": "-10",
"received_by_me": "0",
"spent_by_me": "10",
"timestamp": 1608725061,
"to": [
"qHmJ3KA6ZAjR9wGjpFASn4gtUSeFAqdZgs"
],
"total_amount": "10",
"tx_hash": "8fbc5538679e4c4b78f8b9db0faf9bf78d02410006e8823faadba8e8ae721d60",
"tx_hex": "f86d820a59843b9aca0082520894bab36286672fbdc7b250804bf6d14be0df69fa28888ac7230489e80000801ba0fee87414a3b40d58043a1ae143f7a75d7f47a24e872b638281c448891fd69452a05b0efcaed9dee1b6d182e3215d91af317d53a627404b0efc5102cfe714c93a28"
}