CetoEX Market Making API

Complete Trading API for Professional Market Makers

Base URL

https://mm.cetoex.com/api/market-making

Overview & Authentication

Authentication

All endpoints require:

  • investor_id - Your unique ID
  • api_key - Your API key

Rate Limits

Standard: 100/min

Bulk: 10/min

Per investor_id

API Status

GET /status

Check API health

Account & Portfolio

POST

/account/info

Get your account balance and complete portfolio information

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here"
}

cURL Example

curl -X POST https://mm.cetoex.com/api/market-making/account/info \
  -H "Content-Type: application/json" \
  -d '{
    "investor_id": 12345,
    "api_key": "your_api_key"
  }'

Response

{
  "success": true,
  "data": {
    "investor_id": 12345,
    "usdt_balance": 1000.50,
    "total_portfolio_value": 2500.75,
    "portfolio": [
      {
        "symbol": "BTC",
        "balance": 0.05,
        "current_price": 45000.00,
        "value_usdt": 2250.00
      }
    ],
    "timestamp": "2024-01-15T10:30:00.000Z"
  }
}

Market Data

POST

/market/data

Get real-time market data for specific symbol or all symbols

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "symbol": "BTC"
}

Note: symbol is optional. Omit to get all symbols.

Response

{
  "success": true,
  "data": {
    "symbol": "BTC",
    "price": 45000.00,
    "volume_24h": 1234567.89,
    "change_24h": 2.5,
    "high_24h": 46000.00,
    "low_24h": 44000.00
  },
  "timestamp": "2024-01-15T10:30:00.000Z"
}
POST

/market/orderbook

Get orderbook (buy/sell orders) for a specific symbol

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "symbol": "BTC",
  "limit": 20
}

Response

{
  "success": true,
  "data": {
    "symbol": "BTC",
    "bids": [
      [44950.00, 0.5],
      [44940.00, 1.2]
    ],
    "asks": [
      [45050.00, 0.8],
      [45060.00, 0.3]
    ]
  }
}
POST

/market/trades

Get recent trade history for a specific symbol

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "symbol": "BTC",
  "limit": 50
}

Response

{
  "success": true,
  "data": {
    "symbol": "BTC",
    "trades": [
      {
        "timestamp": "2024-01-15T10:30:00Z",
        "price": 45000.00,
        "amount": 0.1,
        "side": "buy"
      }
    ]
  }
}

Order Management

POST

/orders/place

Place a new buy or sell order (limit or market)

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "symbol": "BTC",
  "side": "buy",
  "type": "limit",
  "amount": 0.1,
  "price": 44000.00
}

Parameters:
• side: "buy" | "sell"
• type: "limit" | "market"
• Minimum order: 5 USDT

Response

{
  "success": true,
  "data": {
    "order_id": 12345,
    "symbol": "BTC",
    "side": "buy",
    "type": "limit",
    "amount": 0.1,
    "price": 44000.00,
    "status": "open",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}
POST

/orders/cancel

Cancel an existing open order

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "order_id": 12345
}

Response

{
  "success": true,
  "data": {
    "order_id": 12345,
    "status": "cancelled",
    "message": "Order cancelled successfully"
  }
}
POST

/orders/open

Get all your currently open orders

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "symbol": "BTC"
}

Note: symbol is optional for filtering.

Response

{
  "success": true,
  "data": {
    "orders": [
      {
        "order_id": 12345,
        "symbol": "BTC",
        "side": "buy",
        "type": "limit",
        "amount": 0.1,
        "price": 44000.00,
        "status": "open",
        "created_at": "2024-01-15T10:30:00Z"
      }
    ],
    "total": 1
  }
}
POST

/orders/history

Get your order history (all orders)

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "symbol": "BTC",
  "limit": 50
}

Response

{
  "success": true,
  "data": {
    "orders": [
      {
        "order_id": 12345,
        "symbol": "BTC",
        "side": "buy",
        "type": "limit",
        "amount": 0.1,
        "status": "filled",
        "created_at": "2024-01-15T10:30:00Z"
      }
    ],
    "total": 1
  }
}

Bulk Operations

Rate Limit: Bulk operations are limited to 10 requests per minute and stricter validation.

POST

/orders/bulk/place

Place multiple orders in a single request (max 20 orders)

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "orders": [
    {
      "symbol": "BTC",
      "side": "buy",
      "type": "limit",
      "amount": 0.1,
      "price": 44000.00
    },
    {
      "symbol": "ETH",
      "side": "sell",
      "type": "limit",
      "amount": 1.0,
      "price": 3000.00
    }
  ]
}

Response

{
  "success": true,
  "data": {
    "total_orders": 2,
    "successful": 2,
    "failed": 0,
    "results": [
      {
        "index": 0,
        "success": true,
        "order_id": 12345,
        "symbol": "BTC"
      },
      {
        "index": 1,
        "success": true,
        "order_id": 12346,
        "symbol": "ETH"
      }
    ]
  }
}
POST

/orders/bulk/cancel

Cancel multiple orders in a single request (max 50 orders)

Request

{
  "investor_id": 12345,
  "api_key": "your_api_key_here",
  "order_ids": [12345, 12346, 12347]
}

Response

{
  "success": true,
  "data": {
    "total_orders": 3,
    "successful": 2,
    "failed": 1,
    "results": [
      {
        "order_id": 12345,
        "success": true,
        "status": "cancelled"
      },
      {
        "order_id": 12346,
        "success": false,
        "error": "ORDER_NOT_FOUND"
      }
    ]
  }
}

Error Handling

All errors return in this standardized format:

{
  "error": "ERROR_CODE",
  "message": "Human readable error message"
}

Common Error Codes

  • INVALID_CREDENTIALS Invalid investor_id or api_key
  • RATE_LIMIT_EXCEEDED Too many requests
  • INSUFFICIENT_BALANCE Not enough balance
  • ORDER_NOT_FOUND Order doesn't exist
  • SYMBOL_NOT_FOUND Trading pair not found
  • ORDER_TOO_SMALL Order below 5 USDT minimum
  • INVALID_PARAMS Invalid or missing parameters

HTTP Status Codes

  • 200 Success
  • 400 Bad Request
  • 401 Unauthorized
  • 404 Not Found
  • 429 Rate Limited
  • 500 Server Error

Need Help?

Get in touch with our support team

© 2024 CetoEX. All rights reserved.

Professional Market Making API