Satori Finance Docs
  • ✨About Satori Finance
  • 👉Beginner's Guide
    • Deposit & Withdrawal
    • Trading
  • 💸Perpetual Trading
    • Matchmaking
    • Margin
    • Isolated/Cross Margin
    • Funding Costs
    • Trading fees
    • Index Price
    • Mark Price
    • Liquidations
    • Insurance Funds
    • Automatic Deleveraging
  • 🌽Vaults
  • 📲Telegram Mini APP
  • 🚀Liquid Restaked Tokens (LRT)
  • 🔥Points
  • 🎉Trading Competition
    • Satori Season2 Trading Competition Backed by Hemi
  • 🎭Referrals
  • 🦄Ecosystem Partner Incentives
  • API DOCS
    • 👨‍💻OpenAPI
      • Introduce
      • Auth
      • URL
      • Response Code
      • Rest API
        • A complete example
        • Order Operation 【Private Operation】
          • Create order
          • Batch create orders
          • Cancel order
          • Batch Cancel orders
        • Position Operation 【private operation】
          • Add/reduce margin
        • 【Private Query】
          • [Account] Query account balance
          • [Order] Query current order list
          • [Trade] Query match result
          • [Position] Query position list
        • 【Public Query】
          • System time
          • Index price
          • Mark price
          • Last trade
          • Pair list
      • WebSocket
        • Events
        • Subscription
          • Basic parameters
          • Example
          • Account
          • Orders
          • Positions
          • Trades
Powered by GitBook
On this page
  1. API DOCS
  2. OpenAPI
  3. WebSocket
  4. Subscription

Account

Request append param

name

type

required

detail

symbol

String

√

{
  "symbol": "ETH",
  "method": "SUBSCRIBE",
  "apiKey": "?",
    "signType": 2,
  "signature": "?",
  "event": "api_account",
  "timestamp": 1657157345159
}

Receive data:

name

type

required

detail

data

Object

accoint info

event

String

api_account

success

Boolean

true,false

Data object:

name

type

required

detail

availableAmount

String

frozenAmount

String

logId

Long

Flow ID: determines the version. If the logId is small, the history balance is displayed

operateAmount

String

symbol

String

coinId

Long

Example:

1 Get current timestamp(ms):

1725870284179

2 Sign the string format of the timestamp, result:

0xb24d1c6e35ca7532cf5c984397f842684da580e6c3d3fe8212c90fa59dcfaec955700dcaafc45259ca6e181c96c006427fc121af898dbdc10457df65e485a0c61c

3 Assembling parameters, including basic parameters for subscription and custom additional parameters for the interface.

{
    "symbol": "USD",
    "method": "SUBSCRIBE",
    "event": "api_account",
    "apiKey": "st_fq6cvRF4fr5tnKiZfrIntRnLfrwxcXjcfr1y8FR7",
    "signature": "0xb24d1c6e35ca7532cf5c984397f842684da580e6c3d3fe8212c90fa59dcfaec955700dcaafc45259ca6e181c96c006427fc121af898dbdc10457df65e485a0c61c",
    "timestamp": 1725870284179,
    "signType": "2"
}

4 Returns after a successful subscription

{
    "event": "api_account_res",
    "method": "SUBSCRIBE",
    "msg": "subscribe success: api_account",
    "success": true,
    "symbol": "USD"
}

5 Server websocket push data.

{
    "data": {
        "availableAmount": "999757.863799",
        "coinId": 4,
        "frozenAmount": "241.506568",
        "logId": 0,
        "operateAmount": "0.00",
        "symbol": "USD"
    },
    "event": "api_account",
    "success": true,
    "symbol": "USD"
}

PreviousExampleNextOrders

Last updated 7 months ago

👨‍💻