tanya/okx/tickerApi.go
zhangkun9038@dingtalk.com 18f15b0534 up
2025-03-06 00:31:55 +08:00

27 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package okx
// TickerRequest 定义获取单个 ticker 的请求参数
type TickerRequest struct {
InstID string `url:"instId"` // 必填交易对ID
}
// Ticker 定义 ticker 返回数据结构
type Ticker struct {
InstType string `json:"instType"` // 产品类型
InstID string `json:"instId"` // 交易对ID
Last string `json:"last"` // 最新成交价
LastSz string `json:"lastSz"` // 最新成交数量
AskPx string `json:"askPx"` // 卖一价
AskSz string `json:"askSz"` // 卖一量
BidPx string `json:"bidPx"` // 买一价
BidSz string `json:"bidSz"` // 买一量
Open24h string `json:"open24h"` // 24小时开盘价
High24h string `json:"high24h"` // 24小时最高价
Low24h string `json:"low24h"` // 24小时最低价
VolCcy24h string `json:"volCcy24h"` // 24小时成交量按币种计
Vol24h string `json:"vol24h"` // 24小时成交量按张数计
Ts string `json:"ts"` // 数据生成时间戳
SodUtc0 string `json:"sodUtc0"` // UTC 0点开盘价
SodUtc8 string `json:"sodUtc8"` // UTC 8点开盘价
}