Trader API

Build trading bots and integrations with the MYEX API

Quick Start

# Base URL
https://myex.exchange/api/v1

# Authentication (add to headers)
X-API-Key: your_api_key_here
X-API-Secret: your_api_secret_here

# Example: Get prices
curl https://myex.exchange/api/v1/market/prices
Rate limit: 100 req/min HMAC-SHA256 signing WebSocket available
GET/api/v1/market/prices

Get all token prices

{
  "data": [
    { "symbol": "MPRA", "price": "2.45", "change24h": 5.32 },
    { "symbol": "VENUS", "price": "0.087", "change24h": -1.2 }
  ]
}
GET/api/v1/market/orderbook/:pair

Get order book for a trading pair

{
  "bids": [{ "price": "2.44", "quantity": "500" }],
  "asks": [{ "price": "2.46", "quantity": "300" }]
}
GET/api/v1/market/trades/:pair

Get recent trades for a pair

{
  "trades": [
    { "price": "2.45", "quantity": "100", "side": "buy", "time": 1710000000 }
  ]
}
GET/api/v1/market/history/:symbol

Get price history with timeframes

{
  "history": [
    { "timestamp": 1710000000, "price": "2.45", "volume": "12000" }
  ]
}
GET/api/v1/account/balances Auth

Get wallet balances

{
  "balances": [
    { "token": "MPRA", "available": "1000.00", "locked": "50.00" }
  ]
}
POST/api/v1/trading/order Auth

Place a new order

// Request
{ "pair": "MPRA/USDT", "side": "buy", "type": "limit", "price": "2.45", "quantity": "100" }

// Response
{ "orderId": 12345, "status": "open" }
DELETE/api/v1/trading/order/:id Auth

Cancel an order

{ "success": true, "orderId": 12345 }
GET/api/v1/trading/orders Auth

Get open orders

{
  "orders": [
    { "id": 12345, "pair": "MPRA/USDT", "side": "buy", "price": "2.45", "quantity": "100", "status": "open" }
  ]
}
GET/api/v1/portfolio/holdings Auth

Get portfolio holdings with P&L

{
  "totalValue": "15234.50",
  "holdings": [
    { "token": "MPRA", "amount": "1000", "value": "2450.00", "pnl": "+5.3%" }
  ]
}