ALLINONE
  1. API
ALLINONE
  • AIO Solution Brief
  • Overview
  • Getting Started
  • Supported Blockchain Networks and Tokens
  • Subaddresses and collection
  • Fund Pool and Withdrawal
  • Funds flow
  • Registration
  • Subaddress transactions
  • API
    • API Basics
    • API Encryption Transmission
    • Create Sub-Address
      POST
    • Create Multiple Subaddresses
      POST
    • Get Sub-Address List
      GET
    • Get Sub-Address Transaction
      GET
    • Create Withdraw Transaction
      POST
    • Direct Withdrawal Transaction
      POST
    • Get Withdraw Transaction details
      GET
    • Get Supported Blockchains and Tokens
      GET
  • Description
    • Collection Instructions
    • Withdrawal Instructions
    • 2-FA Authentication
    • TG Bot
    • Webhook
  • User Experience
    • Overview
    • Registration/Signup
    • Login/Signin
    • Enable TOTP
    • Reset Forgotten Password
    • Subaddress
    • Subaddress transactions
    • Collection Address
    • Fund Pool Addresses
    • Gas Management addresses
    • Settings
      • API Keys and Data encryption
      • IP Whitelisting in API Keys
      • IP Whitelisting - Dashboard
      • Webhooks
  • 用户体验
    • 注册
    • 登录
    • TOTP
    • 忘記密碼
    • 子地址
    • 子地址详情
    • 收款地址概览 (Collection Addresses)
    • 资金池概览 (FundPool Addresses)
    • 燃气管理地址 (Gas Management Addresses)
    • 设置
      • API密钥和数据加密
      • API 密钥中的 IP 白名单
      • AIO仪表板IP白名单
      • 用于通知的 Webhooks
  1. API

Create Sub-Address

Prod Env
https://api.aio.cash
Prod Env
https://api.aio.cash
POST
/user-addrs

Endpoint Description: /user-addrs#

This endpoint facilitates the creation of multiple new blockchain subaddresses for a specified chain based on the provided requirements. It allows the creation of addresses, enhancing efficiency for operations that need to manage multiple wallet addresses for a single chain.

Request Body Requirements#

Object: The request body must specify the blockchain chain, the count of addresses to generate, and optionally, the type of address, which is relevant for certain chains.

Properties#

chain: Specifies the blockchain type for which the address(es) will be generated. Supported values are 'BITCOIN', 'ETHEREUM', 'LITECOIN', 'TRON', 'ARBITRUM_ONE', and 'OPTIMISM'.
count: Indicates the number of addresses to generate. The value must be an integer between 1 and 6.
type (optional): Specifies the type of address to generate. For BITCOIN, the valid types are DEFAULT and P2WPKH. For all other chains, the only valid type is DEFAULT. This field defaults to DEFAULT if not provided.

Validation Rules#

1.
Chain Specific:
For BITCOIN, both DEFAULT (which generates a P2TR type address) and P2WPKH are valid values for the type field.
For chains other than BITCOIN, the type must be DEFAULT.
2.
Type Constraints:
The type field is validated based on the chain specified:
If BITCOIN is selected, type can be either DEFAULT or P2WPKH.
For ETHEREUM, LITECOIN, TRON, ARBITRUM_ONE, and OPTIMISM, only DEFAULT is acceptable.
3.
Count Validation:
The count must be a positive integer and should not exceed 5 to prevent excessive load and potential misuse of the service.

Error Handling#

Custom error messages are provided to ensure that any input validation errors are clearly communicated to the developer, aiding in quick resolution:
Chain Validation Error: "Invalid chain specified. Allowed chains are 'BITCOIN', 'ETHEREUM', 'LITECOIN', 'TRON', 'ARBITRUM_ONE', and 'OPTIMISM'."
Count Validation Error: "Invalid count specified. The count must be a positive integer between 1 and 5."
Type Validation Error: "Invalid type specified for the selected chain."

Rate Limit#

Specified rate limit for this endpoint is 3 requests per IP address per minute.

Request

Authorization
Add parameter in header
apikey
Example:
apikey: ********************
Body Params application/json
chain
enum<string> 
required
Blockchain
Allowed values:
ETHEREUMOPTIMISMBITCOINLITECOINTRONARBITRUM_ONEARBITRUM_NOVA
Example:
ETHEREUM
count
integer 
optional
>= 1<= 6
Default:
1
Examples:
15
type
enum<string> 
optional
Address Type For BTC/LTC
Allowed values:
P2WPKHP2TRDEFAULT
Example
{
  "chain": "TRON",
  "count": 1
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.aio.cash/user-addrs' \
--header 'Content-Type: application/json' \
--header 'apikey;' \
--data-raw '{
    "chain": "TRON",
    "count": 1
}'

Responses

🟢200Success
application/json
Body
success
boolean 
required
API Normal response flag
Default:
true
msg
string 
required
Response result message
Default:
ok
data
array [object {2}] 
required
chain
enum<string> 
required
Blockchain
Allowed values:
ETHEREUMOPTIMISMBITCOINLITECOINTRONARBITRUM_ONEARBITRUM_NOVA
Example:
ETHEREUM
addr
string 
required
Example
{
  "success": true,
  "data": [
    {
      "addr": "0xc3b1Cfb301D33A08fA9D9Af13A8D651Cc19f9C06",
      "chain": "ETHEREUM"
    }
  ],
  "msg": "ok"
}
🟠403Authentication error
🟠422Parameter error
🟠429Rate Limit Error
Previous
API Encryption Transmission
Next
Create Multiple Subaddresses
Built with