github.com/vmpartner/bitmex@v1.1.0/swagger/instrument.go (about) 1 /* 2 * BitMEX API 3 * 4 * ## REST API for the BitMEX Trading Platform [View Changelog](/app/apiChangelog) #### Getting Started ##### 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](https://www.bitmex.com/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. 5 * 6 * OpenAPI spec version: 1.2.0 7 * Contact: support@bitmex.com 8 * Generated by: https://github.com/swagger-api/swagger-codegen.git 9 */ 10 11 package swagger 12 13 import ( 14 "time" 15 ) 16 17 // Tradeable Contracts, Indices, and History 18 type Instrument struct { 19 Symbol string `json:"symbol"` 20 21 RootSymbol string `json:"rootSymbol,omitempty"` 22 23 State string `json:"state,omitempty"` 24 25 Typ string `json:"typ,omitempty"` 26 27 Listing time.Time `json:"listing,omitempty"` 28 29 Front time.Time `json:"front,omitempty"` 30 31 Expiry time.Time `json:"expiry,omitempty"` 32 33 Settle time.Time `json:"settle,omitempty"` 34 35 RelistInterval time.Time `json:"relistInterval,omitempty"` 36 37 InverseLeg string `json:"inverseLeg,omitempty"` 38 39 SellLeg string `json:"sellLeg,omitempty"` 40 41 BuyLeg string `json:"buyLeg,omitempty"` 42 43 PositionCurrency string `json:"positionCurrency,omitempty"` 44 45 Underlying string `json:"underlying,omitempty"` 46 47 QuoteCurrency string `json:"quoteCurrency,omitempty"` 48 49 UnderlyingSymbol string `json:"underlyingSymbol,omitempty"` 50 51 Reference string `json:"reference,omitempty"` 52 53 ReferenceSymbol string `json:"referenceSymbol,omitempty"` 54 55 CalcInterval time.Time `json:"calcInterval,omitempty"` 56 57 PublishInterval time.Time `json:"publishInterval,omitempty"` 58 59 PublishTime time.Time `json:"publishTime,omitempty"` 60 61 MaxOrderQty float32 `json:"maxOrderQty,omitempty"` 62 63 MaxPrice float64 `json:"maxPrice,omitempty"` 64 65 LotSize float32 `json:"lotSize,omitempty"` 66 67 TickSize float64 `json:"tickSize,omitempty"` 68 69 Multiplier float32 `json:"multiplier,omitempty"` 70 71 SettlCurrency string `json:"settlCurrency,omitempty"` 72 73 UnderlyingToPositionMultiplier float32 `json:"underlyingToPositionMultiplier,omitempty"` 74 75 UnderlyingToSettleMultiplier float32 `json:"underlyingToSettleMultiplier,omitempty"` 76 77 QuoteToSettleMultiplier float32 `json:"quoteToSettleMultiplier,omitempty"` 78 79 IsQuanto bool `json:"isQuanto,omitempty"` 80 81 IsInverse bool `json:"isInverse,omitempty"` 82 83 InitMargin float64 `json:"initMargin,omitempty"` 84 85 MaintMargin float64 `json:"maintMargin,omitempty"` 86 87 RiskLimit float32 `json:"riskLimit,omitempty"` 88 89 RiskStep float32 `json:"riskStep,omitempty"` 90 91 Limit float64 `json:"limit,omitempty"` 92 93 Capped bool `json:"capped,omitempty"` 94 95 Taxed bool `json:"taxed,omitempty"` 96 97 Deleverage bool `json:"deleverage,omitempty"` 98 99 MakerFee float64 `json:"makerFee,omitempty"` 100 101 TakerFee float64 `json:"takerFee,omitempty"` 102 103 SettlementFee float64 `json:"settlementFee,omitempty"` 104 105 InsuranceFee float64 `json:"insuranceFee,omitempty"` 106 107 FundingBaseSymbol string `json:"fundingBaseSymbol,omitempty"` 108 109 FundingQuoteSymbol string `json:"fundingQuoteSymbol,omitempty"` 110 111 FundingPremiumSymbol string `json:"fundingPremiumSymbol,omitempty"` 112 113 FundingTimestamp time.Time `json:"fundingTimestamp,omitempty"` 114 115 FundingInterval time.Time `json:"fundingInterval,omitempty"` 116 117 FundingRate float64 `json:"fundingRate,omitempty"` 118 119 IndicativeFundingRate float64 `json:"indicativeFundingRate,omitempty"` 120 121 RebalanceTimestamp time.Time `json:"rebalanceTimestamp,omitempty"` 122 123 RebalanceInterval time.Time `json:"rebalanceInterval,omitempty"` 124 125 OpeningTimestamp time.Time `json:"openingTimestamp,omitempty"` 126 127 ClosingTimestamp time.Time `json:"closingTimestamp,omitempty"` 128 129 SessionInterval time.Time `json:"sessionInterval,omitempty"` 130 131 PrevClosePrice float64 `json:"prevClosePrice,omitempty"` 132 133 LimitDownPrice float64 `json:"limitDownPrice,omitempty"` 134 135 LimitUpPrice float64 `json:"limitUpPrice,omitempty"` 136 137 BankruptLimitDownPrice float64 `json:"bankruptLimitDownPrice,omitempty"` 138 139 BankruptLimitUpPrice float64 `json:"bankruptLimitUpPrice,omitempty"` 140 141 PrevTotalVolume float32 `json:"prevTotalVolume,omitempty"` 142 143 TotalVolume float32 `json:"totalVolume,omitempty"` 144 145 Volume float32 `json:"volume,omitempty"` 146 147 Volume24h float32 `json:"volume24h,omitempty"` 148 149 PrevTotalTurnover float32 `json:"prevTotalTurnover,omitempty"` 150 151 TotalTurnover float32 `json:"totalTurnover,omitempty"` 152 153 Turnover float32 `json:"turnover,omitempty"` 154 155 Turnover24h float32 `json:"turnover24h,omitempty"` 156 157 PrevPrice24h float64 `json:"prevPrice24h,omitempty"` 158 159 Vwap float64 `json:"vwap,omitempty"` 160 161 HighPrice float64 `json:"highPrice,omitempty"` 162 163 LowPrice float64 `json:"lowPrice,omitempty"` 164 165 LastPrice float64 `json:"lastPrice,omitempty"` 166 167 LastPriceProtected float64 `json:"lastPriceProtected,omitempty"` 168 169 LastTickDirection string `json:"lastTickDirection,omitempty"` 170 171 LastChangePcnt float64 `json:"lastChangePcnt,omitempty"` 172 173 BidPrice float64 `json:"bidPrice,omitempty"` 174 175 MidPrice float64 `json:"midPrice,omitempty"` 176 177 AskPrice float64 `json:"askPrice,omitempty"` 178 179 ImpactBidPrice float64 `json:"impactBidPrice,omitempty"` 180 181 ImpactMidPrice float64 `json:"impactMidPrice,omitempty"` 182 183 ImpactAskPrice float64 `json:"impactAskPrice,omitempty"` 184 185 HasLiquidity bool `json:"hasLiquidity,omitempty"` 186 187 OpenInterest float32 `json:"openInterest,omitempty"` 188 189 OpenValue float32 `json:"openValue,omitempty"` 190 191 FairMethod string `json:"fairMethod,omitempty"` 192 193 FairBasisRate float64 `json:"fairBasisRate,omitempty"` 194 195 FairBasis float64 `json:"fairBasis,omitempty"` 196 197 FairPrice float64 `json:"fairPrice,omitempty"` 198 199 MarkMethod string `json:"markMethod,omitempty"` 200 201 MarkPrice float64 `json:"markPrice,omitempty"` 202 203 IndicativeTaxRate float64 `json:"indicativeTaxRate,omitempty"` 204 205 IndicativeSettlePrice float64 `json:"indicativeSettlePrice,omitempty"` 206 207 SettledPrice float64 `json:"settledPrice,omitempty"` 208 209 Timestamp time.Time `json:"timestamp,omitempty"` 210 }