LogoLogo
Launch App
  • Standard
    • Thesis
    • Core Contributors
    • Sigma
    • $STND
    • Tokenomics
    • DeFi 3.0
  • Apps
    • Spot
      • For Traders
        • Market
        • Order Type
      • For Developers
        • REST API
        • Websocket Streams
          • Connect
          • Trades
          • Orders
          • Orderhistories
          • Prices
          • Orderbook
      • For Projects
        • Listing
        • Launchpad
        • Terminal
        • Market Making
    • Vaults
  • Standard L3
    • What is Standard L3?
      • How Standard L3 works
      • Modular Architecture
      • Bridge
Powered by GitBook
On this page
  • Stream trades in all pairs in Standard spot exchange
  • ✅ Request
  • 📤 Response
  • 📡 Streamed Data Format
  • 📄 Field Descriptions
  • Stream trades in specific pairs in Standard spot exchange
  • ✅ Request
  • 📤 Response
  • 📡 Streamed Data Format
  • 📄 Field Descriptions

Was this helpful?

  1. Apps
  2. Spot
  3. For Developers
  4. Websocket Streams

Trades

Stream trades in all pairs in Standard spot exchange

✅ Request

Subscription
{
  "id": 1,
  "method": "spot.trades.subscribe.pairs.all",
  "params": null
}
Unsubscription
{
  "id": 1,
  "method": "spot.trades.unsubscribe.pairs.all",
  "params": null
}

📤 Response

Success
{
  "result": null,
  "id": 1
}
Error
{
  "code": 1,
  "msg": "Internal Error: {error}"
}

📡 Streamed Data Format

Trade Stream
[
  "spotTrade",                  // eventId
  987654,                       // orderId
  "0xBaseTokenAddress",         // base token address
  "0xQuoteTokenAddress",        // quote token address
  "ETH",                        // base token symbol
  "USDC",                       // quote token symbol
  "0xPairAddress",              // pair contract address
  "ETH/USDC",                   // pair symbol
  true,                         // isBid (true = buy, false = sell)
  3142.25,                      // price
  "0xUserAddress",              // account (initiator)
  "0xAssetAddress",             // traded asset address
  "ETH",                        // traded asset symbol
  1.5,                          // amount (of asset)
  4713.375,                     // valueUSD
  1.5,                          // baseAmount
  4713.375,                     // quoteAmount
  1713657900,                   // timestamp (Unix)
  "0xTakerAddress",             // taker address
  "0xMakerAddress",             // maker address
  "0xTransactionHash"           // transaction hash
]

📄 Field Descriptions

Index
Field
Type
Description

0

eventId

String

Unique event identifier

1

orderId

Number

ID of the trade order

2

base

String

Base token address

3

quote

String

Quote token address

4

baseSymbol

String

Symbol of base token

5

quoteSymbol

String

Symbol of quote token

6

pair

String

Address of the pair contract

7

pairSymbol

String

Symbol of the pair (e.g., ETH/USDC)

8

isBid

Boolean

true if it's a buy, false if sell

9

price

Number

Price per unit in quote token

10

account

String

Address of the user initiating the trade

11

asset

String

Address of the asset being traded

12

assetSymbol

String

Symbol of the traded asset

13

amount

Number

Amount of asset traded

14

valueUSD

Number

Trade value in USD

15

baseAmount

Number

Volume in base token

16

quoteAmount

Number

Volume in quote token

17

timestamp

Number

Unix timestamp of the trade

18

taker

String

Taker address

19

maker

String

Maker address

20

txHash

String

Transaction hash

Stream trades in specific pairs in Standard spot exchange

✅ Request

Subscription
{
  "id": 1,
  "method": "spot.trades.subscribe.pairs",
  "params": {
    "pairs": ["ETH/USDC", "WBTC/USDT"]
  }
}
Unsubscription
{
  "id": 1,
  "method": "spot.trades.unsubscribe.pairs",
  "params": {
    "pairs": ["ETH/USDC", "WBTC/USDT"]
  }
}

📤 Response

Success
{
  "result": null,
  "id": 1
}
Error
{
  "code": 1,
  "msg": "Internal Error: {error}"
}

📡 Streamed Data Format

Trade Stream
[
  "spotTrade",                  // eventId
  987654,                       // orderId
  "0xBaseTokenAddress",         // base token address
  "0xQuoteTokenAddress",        // quote token address
  "ETH",                        // base token symbol
  "USDC",                       // quote token symbol
  "0xPairAddress",              // pair contract address
  "ETH/USDC",                   // pair symbol
  true,                         // isBid (true = buy, false = sell)
  3142.25,                      // price
  "0xUserAddress",              // account (initiator)
  "0xAssetAddress",             // traded asset address
  "ETH",                        // traded asset symbol
  1.5,                          // amount (of asset)
  4713.375,                     // valueUSD
  1.5,                          // baseAmount
  4713.375,                     // quoteAmount
  1713657900,                   // timestamp (Unix)
  "0xTakerAddress",             // taker address
  "0xMakerAddress",             // maker address
  "0xTransactionHash"           // transaction hash
]

📄 Field Descriptions

Index
Field
Type
Description

0

eventId

String

Unique event identifier

1

orderId

Number

ID of the trade order

2

base

String

Base token address

3

quote

String

Quote token address

4

baseSymbol

String

Symbol of base token

5

quoteSymbol

String

Symbol of quote token

6

pair

String

Address of the pair contract

7

pairSymbol

String

Symbol of the pair (e.g., ETH/USDC)

8

isBid

Boolean

true if it's a buy, false if sell

9

price

Number

Price per unit in quote token

10

account

String

Address of the user initiating the trade

11

asset

String

Address of the asset being traded

12

assetSymbol

String

Symbol of the traded asset

13

amount

Number

Amount of asset traded

14

valueUSD

Number

Trade value in USD

15

baseAmount

Number

Volume in base token

16

quoteAmount

Number

Volume in quote token

17

timestamp

Number

Unix timestamp of the trade

18

taker

String

Taker address

19

maker

String

Maker address

20

txHash

String

Transaction hash

PreviousConnectNextOrders

Last updated 25 days ago

Was this helpful?