forked from pradtv/api-connectors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_instrument.go
120 lines (117 loc) · 7.07 KB
/
model_instrument.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
* BitMEX API
*
* ## REST API for the BitMEX Trading Platform [View Changelog](/app/apiChangelog) #### Getting Started Base URI: [https://www.bitmex.com/api/v1](/api/v1) ##### Fetching Data All REST endpoints are documented below. You can try out any query right from this interface. Most table queries accept `count`, `start`, and `reverse` params. Set `reverse=true` to get rows newest-first. Additional documentation regarding filters, timestamps, and authentication is available in [the main API documentation](/app/restAPI). *All* table data is available via the [Websocket](/app/wsAPI). We highly recommend using the socket if you want to have the quickest possible data without being subject to ratelimits. ##### Return Types By default, all data is returned as JSON. Send `?_format=csv` to get CSV data or `?_format=xml` to get XML data. ##### Trade Data Queries *This is only a small subset of what is available, to get you started.* Fill in the parameters and click the `Try it out!` button to try any of these queries. * [Pricing Data](#!/Quote/Quote_get) * [Trade Data](#!/Trade/Trade_get) * [OrderBook Data](#!/OrderBook/OrderBook_getL2) * [Settlement Data](#!/Settlement/Settlement_get) * [Exchange Statistics](#!/Stats/Stats_history) Every function of the BitMEX.com platform is exposed here and documented. Many more functions are available. ##### Swagger Specification [⇩ Download Swagger JSON](swagger.json) ## All API Endpoints Click to expand a section.
*
* API version: 1.2.0
* Contact: [email protected]
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package swagger
import (
"time"
)
// Tradeable Contracts, Indices, and History
type Instrument struct {
Symbol string `json:"symbol"`
RootSymbol string `json:"rootSymbol,omitempty"`
State string `json:"state,omitempty"`
Typ string `json:"typ,omitempty"`
Listing time.Time `json:"listing,omitempty"`
Front time.Time `json:"front,omitempty"`
Expiry time.Time `json:"expiry,omitempty"`
Settle time.Time `json:"settle,omitempty"`
RelistInterval time.Time `json:"relistInterval,omitempty"`
InverseLeg string `json:"inverseLeg,omitempty"`
SellLeg string `json:"sellLeg,omitempty"`
BuyLeg string `json:"buyLeg,omitempty"`
OptionStrikePcnt float64 `json:"optionStrikePcnt,omitempty"`
OptionStrikeRound float64 `json:"optionStrikeRound,omitempty"`
OptionStrikePrice float64 `json:"optionStrikePrice,omitempty"`
OptionMultiplier float64 `json:"optionMultiplier,omitempty"`
PositionCurrency string `json:"positionCurrency,omitempty"`
Underlying string `json:"underlying,omitempty"`
QuoteCurrency string `json:"quoteCurrency,omitempty"`
UnderlyingSymbol string `json:"underlyingSymbol,omitempty"`
Reference string `json:"reference,omitempty"`
ReferenceSymbol string `json:"referenceSymbol,omitempty"`
CalcInterval time.Time `json:"calcInterval,omitempty"`
PublishInterval time.Time `json:"publishInterval,omitempty"`
PublishTime time.Time `json:"publishTime,omitempty"`
MaxOrderQty float32 `json:"maxOrderQty,omitempty"`
MaxPrice float64 `json:"maxPrice,omitempty"`
LotSize float32 `json:"lotSize,omitempty"`
TickSize float64 `json:"tickSize,omitempty"`
Multiplier float32 `json:"multiplier,omitempty"`
SettlCurrency string `json:"settlCurrency,omitempty"`
UnderlyingToPositionMultiplier float32 `json:"underlyingToPositionMultiplier,omitempty"`
UnderlyingToSettleMultiplier float32 `json:"underlyingToSettleMultiplier,omitempty"`
QuoteToSettleMultiplier float32 `json:"quoteToSettleMultiplier,omitempty"`
IsQuanto bool `json:"isQuanto,omitempty"`
IsInverse bool `json:"isInverse,omitempty"`
InitMargin float64 `json:"initMargin,omitempty"`
MaintMargin float64 `json:"maintMargin,omitempty"`
RiskLimit float32 `json:"riskLimit,omitempty"`
RiskStep float32 `json:"riskStep,omitempty"`
Limit float64 `json:"limit,omitempty"`
Capped bool `json:"capped,omitempty"`
Taxed bool `json:"taxed,omitempty"`
Deleverage bool `json:"deleverage,omitempty"`
MakerFee float64 `json:"makerFee,omitempty"`
TakerFee float64 `json:"takerFee,omitempty"`
SettlementFee float64 `json:"settlementFee,omitempty"`
InsuranceFee float64 `json:"insuranceFee,omitempty"`
FundingBaseSymbol string `json:"fundingBaseSymbol,omitempty"`
FundingQuoteSymbol string `json:"fundingQuoteSymbol,omitempty"`
FundingPremiumSymbol string `json:"fundingPremiumSymbol,omitempty"`
FundingTimestamp time.Time `json:"fundingTimestamp,omitempty"`
FundingInterval time.Time `json:"fundingInterval,omitempty"`
FundingRate float64 `json:"fundingRate,omitempty"`
IndicativeFundingRate float64 `json:"indicativeFundingRate,omitempty"`
RebalanceTimestamp time.Time `json:"rebalanceTimestamp,omitempty"`
RebalanceInterval time.Time `json:"rebalanceInterval,omitempty"`
OpeningTimestamp time.Time `json:"openingTimestamp,omitempty"`
ClosingTimestamp time.Time `json:"closingTimestamp,omitempty"`
SessionInterval time.Time `json:"sessionInterval,omitempty"`
PrevClosePrice float64 `json:"prevClosePrice,omitempty"`
LimitDownPrice float64 `json:"limitDownPrice,omitempty"`
LimitUpPrice float64 `json:"limitUpPrice,omitempty"`
BankruptLimitDownPrice float64 `json:"bankruptLimitDownPrice,omitempty"`
BankruptLimitUpPrice float64 `json:"bankruptLimitUpPrice,omitempty"`
PrevTotalVolume float32 `json:"prevTotalVolume,omitempty"`
TotalVolume float32 `json:"totalVolume,omitempty"`
Volume float32 `json:"volume,omitempty"`
Volume24h float32 `json:"volume24h,omitempty"`
PrevTotalTurnover float32 `json:"prevTotalTurnover,omitempty"`
TotalTurnover float32 `json:"totalTurnover,omitempty"`
Turnover float32 `json:"turnover,omitempty"`
Turnover24h float32 `json:"turnover24h,omitempty"`
PrevPrice24h float64 `json:"prevPrice24h,omitempty"`
Vwap float64 `json:"vwap,omitempty"`
HighPrice float64 `json:"highPrice,omitempty"`
LowPrice float64 `json:"lowPrice,omitempty"`
LastPrice float64 `json:"lastPrice,omitempty"`
LastPriceProtected float64 `json:"lastPriceProtected,omitempty"`
LastTickDirection string `json:"lastTickDirection,omitempty"`
LastChangePcnt float64 `json:"lastChangePcnt,omitempty"`
BidPrice float64 `json:"bidPrice,omitempty"`
MidPrice float64 `json:"midPrice,omitempty"`
AskPrice float64 `json:"askPrice,omitempty"`
ImpactBidPrice float64 `json:"impactBidPrice,omitempty"`
ImpactMidPrice float64 `json:"impactMidPrice,omitempty"`
ImpactAskPrice float64 `json:"impactAskPrice,omitempty"`
HasLiquidity bool `json:"hasLiquidity,omitempty"`
OpenInterest float32 `json:"openInterest,omitempty"`
OpenValue float32 `json:"openValue,omitempty"`
FairMethod string `json:"fairMethod,omitempty"`
FairBasisRate float64 `json:"fairBasisRate,omitempty"`
FairBasis float64 `json:"fairBasis,omitempty"`
FairPrice float64 `json:"fairPrice,omitempty"`
MarkMethod string `json:"markMethod,omitempty"`
MarkPrice float64 `json:"markPrice,omitempty"`
IndicativeTaxRate float64 `json:"indicativeTaxRate,omitempty"`
IndicativeSettlePrice float64 `json:"indicativeSettlePrice,omitempty"`
OptionUnderlyingPrice float64 `json:"optionUnderlyingPrice,omitempty"`
SettledPrice float64 `json:"settledPrice,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
}