cURL Testing Commands
Create Deposit Addresses
For BNB, XLM, XRP or EOS wallet:
curl -X POST -H "Content-Type: application/json" -d '{"count":2,"memos":["001","002"]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses
For wallet excepts BNB, XLM, XRP and EOS:
curl -X POST -H "Content-Type: application/json" -d '{"count":2}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses
Query Deposit Addresses
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses?start_index=0&request_number=1000'
Query Deployed Contract Deposit Addresses
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses/contract_txid?txids={TXID1},{TXID2}'
Query Pool Address
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/pooladdress'
Query Pool Address Balance
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/pooladdress/balance'
Query Invalid Deposit Addresses
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses/invalid-deposit'
Query Deposit Callback Detail
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/receiver/notifications/txid/{TX_ID}/{VOUT_INDEX}'
Resend Deposit/Collection Callbacks
curl -X POST -H "Content-Type: application/json" -d '{"notification_id":0}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/callback/resend
Query Deposit Wallet Balance
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/receiver/balance
Update Deposit Address Label
curl -X POST -H "Content-Type: application/json" -d '{"address":"0x2B974a3e0b491bB26e0bF146E6cDaC36EFD574a","label":"take-some-notes"}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses/label
Query Deposit Address Label
curl -X POST -H "Content-Type: application/json" -d '{"addresses":["0x2B974a3De0b491bB26e0bF146E6cDaC36EFD574a","0xF401AC94D9672e79c68e56A6f822b666E5A7d644"]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses/get_labels
Query Delegated Address Balance
curl -X POST -H "Content-Type: application/json" -d '{"addresses":["0x6A2969E4496d5b27967a68b411D7e0218943c1B6","0x1EA22Ed0347E6C9f852cfcBEFE752A026450164b","0x2baB9B3af6041960322a248d5315850fc79a3881"]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/receiver/get-balances
Verify Deposit Addresses
curl -X POST -H "Content-Type: application/json" -d '{"addresses":["0x46d4AD967F68253f61D45a044dC7dC7B13E5A4B3","0x107FF19Ea5fB7de78392e7AcC2A2C7eace891bDc"]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/receiver/addresses/verify
Withdraw Assets
curl -X POST -H "Content-Type: application/json" -d '{"requests":[{"order_id":"888888_1","address":"0x60589A749AAC632e9A830c8aBE042D1899d8Dd15","amount":"0.0001","memo":"memo-001","user_id":"USER01","message":"message-001"},{"order_id":"888888_2","address":"0xf16B7B8900F0d2f682e0FFe207a553F52B6C7015","amount":"0.0002","memo":"memo-002","user_id":"USER01","message":"message-002"}]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/transactions
Cancel Withdrawal Request
curl -X POST http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/transactions/{ORDER_ID}/cancel
Query Latest Withdrawal Transaction State
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/transactions/{ORDER_ID}
Query All Withdrawal Transaction States
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/transactions/{ORDER_ID}/all
Query Withdrawal Transaction Event Logs
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/transactions/eventlog?txid={TXID}
Query Withdrawal Wallet Balance
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/balance
Query Withdrawal Callback Detail
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/notifications/order_id/{ORDER_ID}'
Set Withdrawal Request ACL
curl -X POST -H "Content-Type: application/json" -d '{"acl":"192.168.101.55"}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/transactions/acl
Query Withdrawal Whitelist Configuration
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/whitelist/config
Query Withdrawal Wallet Transaction History
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/transactions
Sign Message
curl -X POST -H "Content-Type: application/json" -d '{"message":"This is proof that I, user A, have access to this address."}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/signmessage
Call Contract Read ABI
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/contract/read?contract=0xad6d458402f60fd3bd25163575031acdce07538d&data=0xdd62ed3e000000000000000000000000d11bd6e308b8dc1c5243d54cf41a427ca0f46943000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564
Add Withdrawal Whitelist Entry
curl -X POST -H "Content-Type: application/json" -d '{"items":[{"address":"GCIFMEYIEWSX3K6EOPMEJ3FHW5AAPD6NW76J7LPBRAKD4JZKTISKUPHJ","memo":"85666","user_id":"USER002"}]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/whitelist
Remove Withdrawal Whitelist Entry
curl -X DELETE -H "Content-Type: application/json" -d '{"items":[{"address":"GCIFMEYIEWSX3K6EOPMEJ3FHW5AAPD6NW76J7LPBRAKD4JZKTISKUPHJ","memo":"85666","user_id":"USER002"}]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/whitelist
Check Withdrawal Whitelist
curl -X POST -H "Content-Type: application/json" -d '{"address":"GCIFMEYIEWSX3K6EOPMEJ3FHW5AAPD6NW76J7LPBRAKD4JZKTISKUPHJ","memo":"85666","user_id":"USER002"}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/whitelist/check
Query Withdrawal Whitelist
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/whitelist
Resend Withdrawal Callbacks
curl -X POST -H "Content-Type: application/json" -d '{"notification_id":0}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/sender/notifications/manual
Query Callback History
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/notifications?from_time=1561651200&to_time=1562255999&type=2'
Query Callback Detail
curl -X POST -H "Content-Type: application/json" -d '{"ids":[90000000140,90000000139]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/notifications/get_by_id
Query Wallet Synchronization Info
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/blocks'
Query Transaction Average Fee
curl -X POST -H "Content-Type: application/json" -d '{"block_num":1}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/autofee
Batch Query Transaction Average Fees
curl -X POST -H "Content-Type: application/json" -d '{"block_nums":[1,5,10]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/autofees
Query Vault Wallet Transaction History
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/transactions?start_index=0&from_time=1559664000&to_time=1562255999&request_number=8'
Query Vault Wallet Balance
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/vault/balance
Activate API Code
curl -X POST http://localhost:8889/v1/mock/wallets/{WALLET_ID}/apisecret/activate
Query API Code Status
curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/apisecret
Refresh API Code
curl -X POST -H "Content-Type: application/json" -d '{"refresh_code":"3EbaSPUpKzHJ9wYgYZqy6W4g43NT365bm9vtTfYhMPra"}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/refreshsecret
Query Wallet Info
curl 'http://localhost:8889/v1/mock/wallets/{WALLET_ID}/info'
Verify Addresses
curl -X POST -H "Content-Type: application/json" -d '{"addresses":["0x635B4764D1939DfAcD3a8014726159abC277BecC","1CK6KHY6MHgYvmRQ4PAafKYDrg1ejbH1cE"]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses/verify
Inspect Callback Endpoint
curl -X POST -H "Content-Type: application/json" -d '{"test_number":102999}' \
http://localhost:8889/v1/mock/wallets/896541/notifications/inspect
List Wallets
curl http://localhost:8889/v1/mock/wallets/readonly/walletlist
Query Wallets Balance
curl http://localhost:8889/v1/mock/wallets/readonly/walletlist/balances
Query Currency Prices
curl http://localhost:8889/v1/mock/currency/prices