API Reference / Tham chiếu API

English | Tiếng Việt

English

Base URL

Production: https://api.olympay.xyz/v1
Testnet: https://api-testnet.olympay.xyz/v1

Authentication

All API requests require authentication using your API key:

const headers = {
  'Authorization': 'Bearer YOUR_API_KEY',
  'Content-Type': 'application/json'
};

Rate Limits

  • Free Tier: 100 requests/hour

  • Pro Tier: 1,000 requests/hour

  • Enterprise: 10,000 requests/hour

Endpoints

StableCoin

Get Balance

Parameters:

  • address (string): Wallet address

  • network (string): Network (ethereum, solana, polygon)

Response:

Transfer Tokens

Request Body:

Response:

On/Off Ramp

Create Ramp Request

Request Body:

Get Ramp Status

CCIP Cross-Chain

Create Cross-Chain Transfer

Request Body:

Earning Platform

Get Earning Stats

Response:

Start Quest

Request Body:

Error Handling

All API responses follow a consistent error format:

Error Codes

Code
Description

INVALID_ADDRESS

Invalid wallet address

INSUFFICIENT_BALANCE

Insufficient token balance

NETWORK_ERROR

Network connection error

RATE_LIMIT_EXCEEDED

API rate limit exceeded

UNAUTHORIZED

Invalid API key

QUEST_NOT_AVAILABLE

Quest not available

SDK Examples

JavaScript/TypeScript

Python


Tiếng Việt

Base URL

Xác thực

Tất cả yêu cầu API cần xác thực bằng API key của bạn:

Giới hạn Tốc độ

  • Gói Miễn phí: 100 yêu cầu/giờ

  • Gói Pro: 1,000 yêu cầu/giờ

  • Doanh nghiệp: 10,000 yêu cầu/giờ

Endpoints

StableCoin

Lấy Số dư

Tham số:

  • address (string): Địa chỉ ví

  • network (string): Mạng (ethereum, solana, polygon)

Phản hồi:

Chuyển Token

Nội dung Yêu cầu:

Phản hồi:

On/Off Ramp

Tạo Yêu cầu Ramp

Nội dung Yêu cầu:

Lấy Trạng thái Ramp

CCIP Chuỗi chéo

Tạo Chuyển Chuỗi chéo

Nội dung Yêu cầu:

Nền tảng Earning

Lấy Thống kê Earning

Phản hồi:

Bắt đầu Quest

Nội dung Yêu cầu:

Xử lý Lỗi

Tất cả phản hồi API tuân theo định dạng lỗi nhất quán:

Mã Lỗi

Mô tả

INVALID_ADDRESS

Địa chỉ ví không hợp lệ

INSUFFICIENT_BALANCE

Số dư token không đủ

NETWORK_ERROR

Lỗi kết nối mạng

RATE_LIMIT_EXCEEDED

Vượt quá giới hạn tốc độ API

UNAUTHORIZED

API key không hợp lệ

QUEST_NOT_AVAILABLE

Quest không khả dụng

Ví dụ SDK

JavaScript/TypeScript

Python