Q
quub
API v1.0

API Reference

Complete reference documentation for Quub's RESTful API. Explore endpoints, request/response formats, and authentication methods.

Base URL
https://api.quub.fi/v1
Authentication
Bearer Token
Rate Limit
1000 req/min

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header as a Bearer token.

Example Request
curl https://api.quub.fi/v1/wallets \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

API Key Types

  • Test Keys: For sandbox environment
  • Live Keys: For production environment
  • Restricted Keys: Limited permissions

Security Notes

  • Never expose API keys in client-side code
  • Rotate keys regularly (every 90 days)
  • Use restricted keys when possible

API Endpoints

Wallets

POST/v1/wallets

Create a new wallet

Request Body

{
  "name": "My Wallet",
  "type": "hot",
  "chain": "ethereum",
  "tags": ["production"]
}

Response (200)

{
  "id": "wlt_123abc",
  "address": "0x742d35...",
  "name": "My Wallet",
  "created_at": "2025-10-10"
}
GET/v1/wallets/:id

Retrieve wallet details

Parameters

idstring, required

The wallet identifier

Response (200)

{
  "id": "wlt_123abc",
  "address": "0x742d35...",
  "balance": "1500.50",
  "chain": "ethereum"
}
GET/v1/wallets

List all wallets

Query Parameters

limitinteger, optional

Max results (default: 20)

offsetinteger, optional

Pagination offset

Response (200)

{
  "wallets": [...],
  "total": 42,
  "limit": 20,
  "offset": 0
}

Transactions

POST/v1/transactions

Send a transaction

Request Body

{
  "from": "wlt_123abc",
  "to": "0x742d35...",
  "amount": "100",
  "currency": "USDC",
  "chain": "ethereum"
}

Response (201)

{
  "id": "tx_456def",
  "status": "pending",
  "hash": "0x9f8c...",
  "created_at": "2025-10-10"
}
GET/v1/transactions/:id

Get transaction status

Parameters

idstring, required

The transaction identifier

Response (200)

{
  "id": "tx_456def",
  "status": "confirmed",
  "confirmations": 12,
  "block": 18234567
}

Portfolio

GET/v1/portfolio

Get portfolio summary

Query Parameters

currencystring, optional

Value currency (USD, EUR)

Response (200)

{
  "total_value": "1500000",
  "assets": [...],
  "chains": [...],
  "updated_at": "2025-10-10"
}

DeFi Operations

POST/v1/defi/stake

Stake tokens in a protocol

Request Body

{
  "protocol": "aave-v3",
  "asset": "ETH",
  "amount": "5.5",
  "wallet_id": "wlt_123abc"
}

Response (201)

{
  "id": "stake_789ghi",
  "status": "pending",
  "expected_apy": "4.25",
  "transaction_id": "tx_..."
}
GET/v1/defi/yields

Get available yield opportunities

Query Parameters

assetstring, optional

Filter by asset

min_apynumber, optional

Minimum APY filter

Response (200)

{
  "opportunities": [
    {
      "protocol": "aave-v3",
      "asset": "USDC",
      "apy": "8.5",
      "tvl": "500000000"
    }
  ]
}

Error Codes

400

Bad Request

Invalid request parameters

401

Unauthorized

Invalid or missing API key

403

Forbidden

Insufficient permissions

404

Not Found

Resource does not exist

429

Rate Limited

Too many requests

500

Server Error

Internal server error

Error Response Format

{
  "error": {
    "code": "invalid_request",
    "message": "Amount must be greater than 0",
    "param": "amount",
    "type": "validation_error"
  }
}

Rate Limiting

Rate Limits

Starter Plan:100 req/min
Professional:1,000 req/min
Enterprise:Custom

Response Headers

X-RateLimit-Limit

Total requests allowed

X-RateLimit-Remaining

Requests remaining

X-RateLimit-Reset

Unix timestamp when limit resets

Need Help with Integration?

Our developer support team is available 24/7 to help you get started. Access our SDK libraries, code examples, and interactive API playground.