Wallet Manager APIs
APIs provided by wallet manager to be called by merchant with signed request described in previous page.
Request Header
X-Message-XXX: 5 extended headers mentioned in Message Format
Content-Type: application/json
APIs
Get Address
Get a new address
POST
/access/get_address
Request Body
merchant_id*
String
client_id*
String
eg.8000001
wallet_name
String
default to client_id
eg.8000001-2
wallet_type*
Enum
1 (ClientWallet)
chain_type*
Enum
2 (ETH)
chain_id*
Long
1
{
"error":null,
"result":{
"address":"rQ91jjiakCxabQ8VVaZnpprqoGoEjgLb3e",
"wallet_tag":"546427610",
"x_address":"TVgXszFTgo5TJKgG5X5ofaNUHEmYSzk4ABoJsseniJMojdW"
}
}
Withdraw
Batch withdraw
POST
/access/batch_withdraw
Request Body
merchant_id*
Long
1001
wallet_type
Enum
default to 2 (HotWallet)
chain_type*
Enum
eg. 2 (ETH)
chain_id*
Long
eg. 1
asset_name*
String
eg. "USDC"
hot_wallet_address
String
eg. "0x8F9092CE573e41d72378Cf8c9d3335584e6843F1"
orders
Json Array
orders/merchant_order_id*
String
Unique order id for each merchant
eg. "P128554693"
orders/amount*
String
eg. "30000000"
orders/decimals*
Integer
eg. 6
orders/to_address*
String
eg. "0x8F9092CE573e41d72378Cf8c9d3335584e6843F1"
orders/to_wallet_tag
String
Tag of wallet of XRP
eg. 123
{
"error":null,
"result":{
"batch_id": 56,
"request_time": 1658215829310
}
}
Enquiry Deposits
Query deposit by tx hash. (In case of orphan block, will return more than one record)
GET
/access/{chain_type}/{chain_id}/transfer/hash/{tx_hash}/deposit
Path Parameters
chain_type*
Enum
chain_id*
String
tx_hash*
String
Query Parameters
offset
Integer
default 0
limit
Integer
default 20
block_hash
String
tx_status
Boolean
Only return success transaction.
valid
Boolean
Only return valid transaction(Exclude uncle block)
# tx_status: boolean, Transaction success or not.
# status: enum_transaction_status, The transaction status.
{
"result":{
"transactions":[
{
"id":"1269",
"merchant_id":"2",
"chain_type":2,
"chain_id":"11155111",
"tx_hash":"0x346371e1cb59323958dd9e30896cd94487704b664df6069eaf07b24b30b21ebe",
"transfer_seq":"1",
"block_hash":"0x76e7f4c327a35209e459a160fd3fd17d0c50d45cea336fe7d81a8512241558d8",
"wallet_name":"ETH InvokerWallet 1",
"ref_no":"LFDTMUMQWXWEPCB7VHU7GW3KTMBG76LIORX3LAHTYXX3KBIW2KUA",
"client_id":"",
"wallet_tag":"",
"block_number":"2169786",
"asset_name":"ETH",
"trans_type":3,
"amount":"500000000000000000",
"is_fee":false,
"tx_status":true,
"trans_fee":"0",
"trans_date":"2022-10-27T07:55:12.000Z",
"wallet_address":"0x36673a8d2d56757cD5686479C776F0d39d4D6ea5",
"direction":1,
"from_address":"0x2d1366C71e86F20De3eeCc3f00F270D78A8CEFe5",
"to_address":"0x36673a8d2d56757cD5686479C776F0d39d4D6ea5",
"confirmation":12,
"status":2,
"wallet_settlement_date":"2022-10-27T08:08:03.126Z",
"created_date":"2022-10-27T07:59:07.963Z",
"last_modified_date":"2022-10-27T08:08:03.126Z",
"post_balance":"500000000000000000",
"to_wallet_tag":"",
"wallet_type_post_balance":null,
"merchant_wallet":{
"wallet_type":3
},
"decimals":18,
"risk_level":0
}
],
"count":1
}
}
Query deposit by ref_no (Recommend)
GET
/access/{chain_type}/{chain_id}/transfer/ref_no/{ref_no}/deposit
Path Parameters
chain_type*
String
chain_id*
String
ref_no*
String
Query Parameters
offset
Integer
default 0
limit
Integer
default 20
block_hash
String
If specify block hash, only one record will be return.
tx_status
Boolean
Only return success transaction.
valid
Boolean
Only return valid transaction(Exclude uncle block)
# tx_status: boolean, Transaction success or not.
# status: enum_transaction_status, The transaction status.
{
"result":{
"transactions":[
{
"id":"1267",
"merchant_id":"2",
"chain_type":2,
"chain_id":"11155111",
"tx_hash":"0x56897ca722a26ad50cfd8b339312b63402c6fc652a1a772dfa8ffb5b4a23ad6f",
"transfer_seq":"1",
"block_hash":"0x0d89a633a534b8cabacbf78086f5a7c46806ff6e675b7e19d7f4ba5ddde1b707",
"wallet_name":"ETH HotWallet 1",
"ref_no":"2L3ZSSNOPQJ2QD6V3HFEZLQGECWL2MFO3D2Y6VW7KFFJGBZCKJUA",
"client_id":"",
"wallet_tag":"",
"block_number":"2169783",
"asset_name":"USDT",
"trans_type":2,
"amount":"10000000",
"is_fee":false,
"tx_status":true,
"trans_fee":"0",
"trans_date":"2022-10-27T07:54:36.000Z",
"wallet_address":"0xD29beC3Bd68B62F987a10452eD5d6e96d6c63580",
"direction":1,
"from_address":"0x2d1366C71e86F20De3eeCc3f00F270D78A8CEFe5",
"to_address":"0xD29beC3Bd68B62F987a10452eD5d6e96d6c63580",
"confirmation":12,
"status":2,
"wallet_settlement_date":"2022-10-27T08:08:03.046Z",
"created_date":"2022-10-27T07:59:07.836Z",
"last_modified_date":"2022-10-27T08:08:03.046Z",
"post_balance":"10000000",
"to_wallet_tag":"",
"wallet_type_post_balance":null,
"merchant_wallet":{
"wallet_type":2
},
"decimals":6,
"risk_level":0
}
],
"count":1
}
}
Enquiry Withdraws
Enquiry withdraw by merchant order ID
GET
/access/withdraw/order/{merchant_order_id}
Path Parameters
merchant_order_id*
String
Query Parameters
withFee
Boolean
Whether return miner fee.
# status: enum_operation_status, The operation status.
# transaction.status: enum_operation_transaction_status, The transaction status of this operation.
{
"result":{
"merchant_id":"2",
"batch_id":"188",
"operation_seq":1,
"merchant_order_id":"P221102A19152",
"wallet_version":1,
"path":"m/44'/144'/0'/0/100000001",
"from_address":"rD6CB9sn7UVpN5eTYr7h8Hsj11Bw4tryZm",
"to_address":"rDGbir4bCsXiTvF4orwUazpVXwZ2YkBQHJ",
"invoker_address":"",
"operation_type":1,
"amount":"1023456",
"chain_type":4,
"chain_id":"2",
"asset_name":"XRP",
"status":4,
"created_date":"2022-11-02T09:13:44.419Z",
"last_modified_date":"2022-11-02T09:32:12.384Z",
"transactions":[
{
"id":"78",
"block_number":"32521011",
"block_hash":"82C08CD3B9CE5AD46B1FCFC135A1BC794E2158AA770F760A49D44EB1F0426589",
"block_time":"2022-11-02T09:32:11.000Z",
"tx_status":true,
"tx_hash":"F777A5E62B6201C963A1AC39C861226312C1F73211B1C3ECCF58454A2A1CF9BB",
"status":4,
"remarks":"",
"trans_fee":"717367",
"trans_fee_decimals":18
}
],
"decimals":6
}
}
Enquiry withdraw by batch ID
GET
/access/withdraw/batch/{batch_id}
Path Parameters
batch_id*
Integer
# status: enum_operation_batch_status, The operation batch status of this withdraw.
# operation.status: enum_operation_status, The operation status.
{
"result":{
"id":"160",
"merchant_id":"2",
"chain_type":4,
"chain_id":"2",
"operation_type":1,
"total_operation":1,
"total_step":1,
"current_step":0,
"status":4,
"created_date":"2022-10-31T01:29:55.325Z",
"last_modified_date":"2022-10-31T01:30:34.529Z",
"created_by":null,
"operations":[
{
"chain_type":4,
"chain_id":"2",
"id":"202",
"merchant_id":"2",
"batch_id":"160",
"operation_seq":1,
"merchant_order_id":"P221031A19054",
"wallet_version":1,
"path":"m/44'/144'/0'/0/100000001",
"from_address":"rD6CB9sn7UVpN5eTYr7h8Hsj11Bw4tryZm",
"to_address":"rDGbir4bCsXiTvF4orwUazpVXwZ2YkBQHJ",
"invoker_address":"",
"operation_type":1,
"amount":"11230000",
"asset_name":"XRP",
"status":4,
"created_date":"2022-10-31T01:29:55.340Z",
"last_modified_date":"2022-10-31T01:30:34.487Z",
"to_wallet_tag":"6",
"to_wallet_type":0,
"to_wallet_version":1,
"to_wallet_path":"m/44'/144'/0'/0/100000102",
"invoker_wallet_version":0,
"invoker_wallet_path":"",
"from_wallet_type":null,
"decimals":6
}
]
}
}
Enquiry Block Number
Get latest block number
GET
/access/chains/get_all_latest_blocks
Query Parameters
chain_type
Enum
Chain type filter
enum_chain_type
chain_id
Long
chain id filter
{
"result":[
{
"chain_id":"65",
"chain_type":2,
"chain_code":"OKCT",
"native_asset_name":"OKT",
"latest_block_number":"16775179",
"latest_pending_block_number":"16775191"
},
{
"chain_id":"97",
"chain_type":2,
"chain_code":"BSCT",
"native_asset_name":"BNB",
"latest_block_number":"25215767",
"latest_pending_block_number":"25215779"
},
{
"chain_id":"2",
"chain_type":4,
"chain_code":"XRPT",
"native_asset_name":"XRP",
"latest_block_number":"33457270",
"latest_pending_block_number":"33276468"
},
{
"chain_id":"1",
"chain_type":3,
"chain_code":"TRX",
"native_asset_name":"TRX",
"latest_block_number":"29643266",
"latest_pending_block_number":"29643272"
},
{
"chain_id":"1",
"chain_type":1,
"chain_code":"BTC",
"native_asset_name":"BTC",
"latest_block_number":"2410026",
"latest_pending_block_number":"2410028"
},
{
"chain_id":"11155111",
"chain_type":2,
"chain_code":"SEP",
"native_asset_name":"ETH",
"latest_block_number":"2423147",
"latest_pending_block_number":"2423227"
}
]
}
Enquiry Balance
Get wallet type balance
GET
/access/wallet_type_balance
Query Parameters
chain_type
Enum
enum_chain_type
chain_id
String
asset_names
String[]
wallet_types
Enum[]
enum_wallet_type
{
"result": [
{
"id": "191",
"merchant_id": "1",
"wallet_type": 3,
"chain_type": 2,
"chain_id": "65",
"asset_name": "OKT",
"balance": "1199985900000000000",
"last_settled_trans_id": "27610",
"created_date": "2022-12-16T07:03:23.117Z",
"last_modified_date": "2023-03-29T07:43:42.056Z",
"decimals": 18
},
{
"id": "195",
"merchant_id": "1",
"wallet_type": 0,
"chain_type": 2,
"chain_id": "65",
"asset_name": "WMT",
"balance": "-3000000000000000000000",
"last_settled_trans_id": "3634",
"created_date": "2022-12-16T07:03:54.723Z",
"last_modified_date": "2022-12-16T07:03:54.723Z",
"decimals": 18
}
]
}
Last updated