Orangepill API Deposit Accounts Map on-chain deposit with deposit account
Ramp account can have one or more related deposit accounts. Balances received to Deposit accounts are automatically and in full forwarded to ramp accounts in process of internal withdrawal. Amount forwarded will be decreased for on chain fee.
Deposit Accounts can simplify implementation for various use cases when you need to distinct sources of deposit or payment. Typical use case for Deposit accounts is payment gateway where each invoice payment must be distinct. Various game monetization scenarios with cenrtal withdrawal account, can also take advantage of this concept.
cURL
Copy echo 'list deposit addresses for account'
curl --location --request GET 'https://api.orangepill.cloud/v1/account/634b56217f6a7b0be52dffbd/address' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json'
In response we get list of all deposit addresses assigned to account.
Copy [
{
"id" : "637176640b45bd060bdced17" ,
"account" : "634b56217f6a7b0be52dffac" ,
"data" : {
"description" : "Payments for customer C123" ,
"customer_id" : "C123"
} ,
"asset" : "BTC" ,
"address" : "bc1qnzspva8xd98wmc546u7pna7w7462uruh8m54tc" ,
"derivation_key" : "1" ,
"xpub" : "xpub6y9XBcH4xcrvNty2QiLU4iiHNwqQTSjh3AYZJ6DuRACoVNC8hmAtE6DtcGU4QVVEr5wMTD65xPSz8svJeXcwpKRwshh2VnyRtm1RuzYhi9h" ,
"destination_tag" : null ,
"memo" : null ,
"message" : null ,
"created_at" : 1668380260771 ,
"error" : null
} ,
{
"id" : "637176640b45bd060bdced19" ,
"account" : "634b562172dffacf6a7b0be5" ,
"data" : {
"my_field_1" : "My data" ,
"my_field_2" : "My data 2" ,
"my_field_3" : true ,
} ,
"asset" : "BTC" ,
"address" : "bc1q7pna7w7462uruh8m54tcnzspva8xd98wmc546u" ,
"derivation_key" : "1" ,
"xpub" : "xpub6DtcGU4QVVEr5wMTD65xPSz8svJeXcwpKRwshh2VnyRtm1RuzYhi9h6y9XBcH4xcrvNty2QiLU4iiHNwqQTSjh3AYZJ6DuRACoVNC8hmAtE" ,
"destination_tag" : null ,
"memo" : null ,
"message" : null ,
"created_at" : 1668380654567 ,
"error" : null
}
]
New assets can be sent to any deposit address.
Add Account Deposit Address
You can add more Deposit Addresses and append custom data
.
Address data
field will be copied to incoming deposit transaction in field address_data
.
cURL
Copy
echo 'add new deposit address for account 634b56217f6a7b0be52dffbd'
curl --location --request POST 'https://api.orangepill.cloud/v1/account/634b56217f6a7b0be52dffbd/address \
--header ' x-api-key: AXVubzpwQDU1dzByYM== ' \
--header ' idempotency-key: 27373fabc392933deffff ' \
--header ' Content-Type: application/json ' \
--data-raw ' {
"data" : {
"my_field_1" : "My data" ,
"my_field_2" : "My data 2" ,
"my_field_3" : true ,
}
}'
In response we get new deposit address.
Copy {
"id" : "63a68d2e94bdaeb815cb4361" ,
"asset" : "ETH" ,
"chain" : "ethereum" ,
"data" : {
"my_field_1" : "My data" ,
"my_field_2" : "My data 2" ,
"my_field_3" : true
} ,
"holder" : "639675ab191e9023f356dfa7" ,
"currency" : "USD" ,
"type" : "deposit" ,
"testnet" : true ,
"ramp" : "63a67bdf94bdaeb815cb433d" ,
"owner" : "639675ab191e9023f356dfa6" ,
"created_at" : 1671859502129 ,
"error" : null ,
"active" : false ,
"frozen" : false ,
"deleted" : false
}
List Deposit Addresses
You can retrieve a list of deposit addresses for account.
Copy echo 'list deposit addresses for account 634b56217f6a7b0be52dffbd'
curl --location --request GET 'https://api.orangepill.cloud/v1/account/634b56217f6a7b0be52dffbd/address \
--header ' x-api-key: AXVubzpwQDU1dzByYM== ' \
--header ' idempotency-key: 27373fabc392933deffff ' \
--header ' Content-Type: application/json '
In response you will receive array of data.
Copy [
{
"address" : {
"id" : "63a67bec94bdaeb815cb4342" ,
"account" : "63a67beb94bdaeb815cb4340" ,
"asset" : "ETH" ,
"address" : "0x3e9df295569d58cb542dba81cfa26ff3ec88fe37" ,
"derivation_key" : "1" ,
"xpub" : "xpub6FHGUXHebY3bD8fvsYeK8kk2eTvS79TweR7J97vcVW61C3iwnxLs64fu38nn4yVVbXfF2XSnMwX14P5oE8ALk1LxThtatUzw9572X9ZzXms" ,
"destination_tag" : null ,
"memo" : null ,
"message" : null ,
"notification" : null ,
"created_at" : 1671855084865 ,
"error" : null
}
} ,
{
"address" : {
"id" : "63a6869594bdaeb815cb4345" ,
"account" : "63a6869394bdaeb815cb4343" ,
"asset" : "ETH" ,
"address" : "0xa84da8686e7394e00b4b4a6d423c34689f8675c1" ,
"derivation_key" : "1" ,
"xpub" : "xpub6DvKZsnWjYXjRTzXKxWVhMpXBy73rzXqPHiKKC3s2vx1JXiLCU6tZA7SEiocE3fVqzJwrDZNBh9GQBsRj4oFkA6csD2x9eNbzBvdCJ3gXQU" ,
"destination_tag" : null ,
"memo" : null ,
"message" : null ,
"notification" : null ,
"created_at" : 1671857813405 ,
"error" : null
}
}
]