Skip to content
Igor Sazonov edited this page Mar 15, 2026 · 1 revision

OKX PHP SDK — Documentation

Welcome to the OKX PHP SDK documentation — a production-ready PHP library for the OKX exchange API v5.

🚀 Features

  • 335 REST API endpoints — Full coverage across all API categories
  • 53 WebSocket channels — Public, private, and business channels
  • Laravel 11/12 integration — Service Provider and Facade included
  • Framework-agnostic — Works standalone or with any PHP framework
  • Strict typing — Typed DTOs for all requests and responses
  • Demo mode — Test strategies risk-free against the OKX paper trading environment
  • PSR-12 compliant — Clean, maintainable code
  • Fully tested — Unit and integration test coverage

📚 Documentation

Getting Started

API Documentation

Guides

🎯 Quick Example

Laravel

use Tigusigalpa\OKX\Facades\OKX;

// Get account balance
$balance = OKX::account()->getBalance();

// Place an order
$order = OKX::trade()->placeOrder(
    instId: 'BTC-USDT',
    tdMode: 'cash',
    side: 'buy',
    ordType: 'market',
    sz: '100'
);

Standalone

use Tigusigalpa\OKX\Client;

$client = new Client(
    apiKey: 'your-api-key',
    secretKey: 'your-secret-key',
    passphrase: 'your-passphrase'
);

$ticker = $client->market()->getTicker('BTC-USDT');

📊 API Coverage

Category Endpoints Status
Account 53
Trade 32
TradingBot 44
Finance 33
Asset 26
CopyTrading 26
Market 24
PublicData 24
RFQ 20
Rubik 15
Sprd 13
Fiat 13
Users 8
Support 2
SystemStatus 1
Affiliate 1
Total 335

🔗 Links

💡 Requirements

  • PHP 8.2 or higher
  • Composer
  • Laravel 11.x or 12.x (optional)

📝 License

MIT License — see LICENSE

👤 Author

Igor Sazonov


Next: Installation →

Clone this wiki locally