Skip to main content
Register your first blockchain wallet for an account to enable digital asset custody for your customer accounts.

Getting Started

This guide walks you through registering a blockchain wallet for an existing account using the Rime API. You’ll make your first successful API call and understand the wallet registration process.
Currently, only Polygon blockchain is supported. Additional chains will be added in future releases.

Prerequisites

Before registering a wallet, ensure you have:
  1. API access credentials - client_id and client_secret from your onboarding
  2. Authentication token - Follow our authentication guide to get your access token
  3. Existing account - An account ID from a previously created account
  4. Blockchain wallet details - The wallet address you want to register for the account

Wallet Registration Requirements

Wallet registration has specific field requirements: Required fields:
  • Account ID (account_id) - ID of the associated account
  • Blockchain network (chain) - Currently only polygon is supported
  • Wallet address (wallet_address) - Valid blockchain address for the specified chain
Optional fields:
  • Set to primary wallet (is_primary) - Set to true to make this the primary wallet for the account
Only one wallet per account can be designated as primary. Setting a new wallet as primary will automatically remove the primary status from other wallets.

Step-by-Step Implementation

Step 1: Prepare wallet registration data

Structure your wallet registration data with the required blockchain information:
{
  "chain": "polygon",
  "wallet_address": "0x1234567890abcdef1234567890abcdef12345678",
  "is_primary": true
}

Step 2: Register the wallet

Make the API call to register the wallet for your account:
curl -X POST https://sandbox.api.rime.finance/v1/accounts/${ACCOUNT_ID}/wallets \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "polygon",
    "wallet_address": "0x1234567890abcdef1234567890abcdef12345678",
    "is_primary": true
  }'

Step 3: Handle the response

A successful wallet registration returns a 201 Created status with the wallet details:
{
  "id": "999e0123-e89b-12d3-a456-426614174004",
  "account_id": "123e4567-e89b-12d3-a456-426614174000",
  "chain": "polygon",
  "wallet_address": "0x1234567890abcdef1234567890abcdef12345678",
  "is_primary": true,
  "created": "2024-01-15T11:00:00Z"
}

Digital Asset Custody

Reference the wallet registration ID in future orders you make for an account. The assets bought in an order will be transferred as tokens to this registered wallet address.

Troubleshooting

Cause: Missing required fields or invalid data formatSolution: Ensure all required fields are provided with valid data types
{
  "error": "Validation error",
  "details": {
    "chain": ["This field is required"],
    "wallet_address": [
      "This field is required and must be a valid blockchain address"
    ]
  }
}
Cause: The specified account ID does not existSolution: Verify the account ID exists by checking your account list
{
  "error": "Account not found",
  "details": "Account with ID '123e4567-e89b-12d3-a456-426614174000' does not exist"
}
Cause: Wallet address already registered for this accountSolution: Each wallet address can only be registered once per account
{
  "error": "Wallet already registered",
  "details": "Wallet address '0x1234567890abcdef1234567890abcdef12345678' is already registered for this account"
}

Next Steps

After registering a wallet, you can:
  1. List registered wallets - View all wallets for the account
  2. Buy shares - Start trading using the registered wallet
  3. Get portfolio information - View holdings across all wallets
Need to register payment methods too? Check out our payment details guide.
I