Account
Get New Deposit Address
This endpoint generates a new cryptocurrency address for a given coin and returns it in a JSON response. The endpoint requires authentication and takes in two parameters: 'coin' and 'native_segwit'. The 'coin' parameter specifies the cryptocurrency for which the address needs to be generated, and the 'native_segwit' parameter is a boolean flag indicating whether the address should be generated using native segwit format. The endpoint checks for permission and address count limits before generating the new address.
POST
/v1/custody/new_address/
API-SECRET*
For BTC address, it supports generating segwit (3 address) and native_ Segwit (bc1 address), see below for details. (*
Cobo supports withdrawal to any BTC address type)
Request
coinrequired
String
Cryptocurrency for which the address needs to be generated.
native_segwit
Bool
Flag indicating whether the address should be generated using native segwit format.
Response
success
bool
request successful or failed
result
object
request(
"POST",
"/v1/custody/new_address/",
{
"coin": "BTC"
"native_segwit": 1
},
api_key, api_secret, host
)
{
"success": true,
"result": {
"address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"coin": "BTC"
}
}
request(
"POST",
"/v1/custody/new_address/",
{
"coin": "BTC"
"native_segwit": 1
},
api_key, api_secret, host
)
{
"success": true,
"result": {
"address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"coin": "BTC"
}
}