Getting Started

Quick Start Guide

1. Prerequisites

Before you begin, ensure you have:

  • A BlocWise developer account

  • API credentials (API key and secret)

  • Basic understanding of blockchain concepts

2. Make Your First API Call

import requests

# Initialize API client
headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
}

# Create a new wallet
response = requests.post(
    'https://api.bloclabs.com/v1/wallets/create',
    headers=headers,
    json={
        'network': 'polygon',
        'environment': 'testnet'
    }
)

print(response.json())

Authentication

Bearer Token Authentication

All API requests must include an Authorization header with a valid Bearer token:

Token Management

Authentication Flow

  1. Register/Login to obtain tokens

  2. Use access token for API requests

  3. Refresh token when expired

  4. Maintain secure token storage

Base URLs

Environment
URL
Description

Production

https://api.bloclabs.com/v1

Production environment

Staging

https://api-staging.bloclabs.com/v1

Staging for testing

Testnet

https://api-testnet.bloclabs.com/v1

Test network environment

API Conventions

Request Format

Response Format

All responses follow a standard format:

Success Response

Error Response

Status Codes

Code
Description

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

429

Too Many Requests

500

Internal Server Error

Rate Limits

Default Limits

Rate Limit Headers

Handling Rate Limits

  • Implement exponential backoff

  • Cache responses when possible

  • Monitor rate limit headers

  • Use bulk operations where available

Versioning

API Versions

Version Header

Version Lifecycle

  1. Beta: Early access, subject to changes

  2. Stable: Production-ready, fully supported

  3. Deprecated: Scheduled for removal

  4. Sunset: No longer supported

Version Support

  • Major versions supported for minimum 12 months

  • Security updates provided for all supported versions

  • Migration guides provided for version upgrades

  • Early access to beta versions available for Pro/Enterprise users

Last updated

Was this helpful?