Trade.mn API
About usContact us
  • API Doc
    • General API Information
    • API Key Setup
    • HTTP Return Codes
    • General Information on Endpoints
    • Endpoint security type
    • SIGNED (TRADE) Endpoint security
      • Timing security
    • Public API Endpoints
      • Terminology
      • ENUM definitions
      • General endpoints
      • Market Data endpoints
        • Order book (USER_DATA)
        • Recent trades list (USER_DATA)
      • Trading endpoints
        • New order (TRADE)
        • Cancel order (TRADE)
        • Current open orders (TRADE)
        • Trade history (TRADE)
      • Wallet endpoints
        • Wallet balance (WALLET)
        • Wallet balance by asset (WALLET)
    • Websocket (Socket.io)
    • Error Codes
    • Postman Collections
Powered by GitBook
On this page

Was this helpful?

  1. API Doc

Websocket (Socket.io)

  • The base endpoint is: wss://trade.mn:8989

Join to a stream (TRD/MNT хослол руу холбогдох)

  • Request

    [
        "join",
        "TRD/MNT"
    ]

Change room (TRD/MNT хослолоос холболт салгаж BTC/MNT руу холбогдох)

  • Request

    [
        "change_room",
        "TRD/MNT",
        "BTC/MNT"
    ]

Order book (Авах, зарах захиалгын сангийн мэдээллийг хүлээн авах)

  • Response

    [
      "orders",
      {
        "sell": {
          "0.176": 501724.147, // price: quantity
          "0.177": 733316.15939547,
          "0.178": 104528.83,
          "0.179": 311643.429,
          "0.18": 17154859.47544444
        },
        "buy": {
          "0.144": 100201,
          "0.145": 110377.172,
          "0.146": 100201,
          "0.147": 100201,
          "0.148": 100201
        }
      }
    ]

Trades (Биелсэн захиалгын мэдээллийг хүлээн авах)

  • Response

    [
      "trades",
      [
        {
          "quantity": 41412.285,
          "price": 0.176,
          "timestamp": 1692937234298
        },
        {
          "quantity": 4587.715,
          "price": 0.176,
          "timestamp": 1692937234298
        },
      ]
    ]

Buy order update (Тухайн үнийн түвшин дээр байгаа тоо ширхэгийг мэдээллийг хүлээн авах - Авах захиалга)

  • Response

    [
      "buy_order_update",
      {
        "3512.1": 496.900256 // price: quantity
      }
    ]

Sell order update (Тухайн үнийн түвшин дээр байгаа тоо ширхэгийг мэдээллийг хүлээн авах - Зарах захиалга)

  • Response

    [
      "sell_order_update",
      {
        "3512.1": 496.900256 // price: quantity
      }
    ]

Matched order (Хэлцэл биелсэн мэдээллийг хүлээн авах)

  • Response

    [
      "matched_order",
      {
        "id": "e991afa9-404b-42a9-ab96-d2e23cfbdf68",
        "takerId": "e8c34e44-2449-4e3f-9935-7d31d4a93afc",
        "quantity": 13.418084,
        "price": 3513,
        "timestamp": 1692946624550
      }
    ]
PreviousWallet balance by asset (WALLET)NextError Codes

Last updated 1 year ago

Was this helpful?