From 56edbdff0139fa85171dcd8b00b43d434d81c31c Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Tue, 17 Dec 2019 20:40:30 -0500 Subject: [PATCH] Rebuild with latest swagger-codegen and swagger spec Fixes issues with connectors pointing to localhost. Fixes #411 --- .../akka-scala/.swagger-codegen/VERSION | 2 +- auto-generated/akka-scala/README.md | 35 +- .../io/swagger/client/api/APIKeyApi.scala | 123 +- .../swagger/client/api/AnnouncementApi.scala | 14 +- .../scala/io/swagger/client/api/ChatApi.scala | 22 +- .../swagger/client/api/EnumsSerializers.scala | 7 +- .../io/swagger/client/api/ExecutionApi.scala | 22 +- .../io/swagger/client/api/FundingApi.scala | 8 +- .../client/api/GlobalNotificationApi.scala | 50 + .../io/swagger/client/api/InstrumentApi.scala | 34 +- .../io/swagger/client/api/InsuranceApi.scala | 8 +- .../swagger/client/api/LeaderboardApi.scala | 22 +- .../swagger/client/api/LiquidationApi.scala | 8 +- .../swagger/client/api/NotificationApi.scala | 48 - .../io/swagger/client/api/OrderApi.scala | 98 +- .../io/swagger/client/api/OrderBookApi.scala | 6 +- .../io/swagger/client/api/PositionApi.scala | 44 +- .../io/swagger/client/api/QuoteApi.scala | 16 +- .../io/swagger/client/api/SchemaApi.scala | 10 +- .../io/swagger/client/api/SettlementApi.scala | 8 +- .../io/swagger/client/api/StatsApi.scala | 14 +- .../io/swagger/client/api/TradeApi.scala | 16 +- .../scala/io/swagger/client/api/UserApi.scala | 416 ++- .../io/swagger/client/api/UserEventApi.scala | 55 + .../io/swagger/client/core/ApiInvoker.scala | 2 +- .../io/swagger/client/core/ApiRequest.scala | 2 +- .../io/swagger/client/core/ApiSettings.scala | 2 +- .../io/swagger/client/core/requests.scala | 2 +- .../io/swagger/client/model/APIKey.scala | 10 +- .../io/swagger/client/model/AccessToken.scala | 8 +- .../io/swagger/client/model/Affiliate.scala | 30 +- .../swagger/client/model/Announcement.scala | 10 +- .../scala/io/swagger/client/model/Chat.scala | 8 +- .../io/swagger/client/model/ChatChannel.scala | 4 +- .../client/model/CommunicationToken.scala | 25 + .../swagger/client/model/ConnectedUsers.scala | 6 +- .../scala/io/swagger/client/model/Error.scala | 2 +- .../io/swagger/client/model/ErrorError.scala | 6 +- .../io/swagger/client/model/Execution.scala | 94 +- .../io/swagger/client/model/Funding.scala | 8 +- .../client/model/GlobalNotification.scala | 41 + .../swagger/client/model/IndexComposite.scala | 14 +- .../client/model/InlineResponse200.scala | 4 +- .../client/model/InlineResponse2001.scala | 22 - .../io/swagger/client/model/Instrument.scala | 204 +- .../client/model/InstrumentInterval.scala | 2 +- .../io/swagger/client/model/Insurance.scala | 4 +- .../io/swagger/client/model/Leaderboard.scala | 6 +- .../io/swagger/client/model/Liquidation.scala | 10 +- .../io/swagger/client/model/Margin.scala | 80 +- .../swagger/client/model/Notification.scala | 41 - .../scala/io/swagger/client/model/Order.scala | 66 +- .../io/swagger/client/model/OrderBookL2.scala | 6 +- .../io/swagger/client/model/Position.scala | 178 +- .../scala/io/swagger/client/model/Quote.scala | 10 +- .../swagger/client/model/QuoteFillRatio.scala | 28 + .../io/swagger/client/model/Settlement.scala | 16 +- .../scala/io/swagger/client/model/Stats.scala | 12 +- .../swagger/client/model/StatsHistory.scala | 8 +- .../io/swagger/client/model/StatsUSD.scala | 12 +- .../scala/io/swagger/client/model/Trade.scala | 18 +- .../io/swagger/client/model/TradeBin.scala | 24 +- .../io/swagger/client/model/Transaction.scala | 24 +- .../scala/io/swagger/client/model/User.scala | 32 +- .../swagger/client/model/UserCommission.scala | 25 - .../model/UserCommissionsBySymbol.scala | 21 + .../io/swagger/client/model/UserEvent.scala | 70 + .../client/model/UserPreferences.scala | 55 +- .../io/swagger/client/model/Wallet.scala | 48 +- .../scala/io/swagger/client/model/XAny.scala | 2 +- .../android/.swagger-codegen/VERSION | 2 +- auto-generated/android/README.md | 39 +- auto-generated/android/docs/APIKeyApi.md | 182 +- auto-generated/android/docs/Affiliate.md | 2 + .../android/docs/AnnouncementApi.md | 4 +- auto-generated/android/docs/ChatApi.md | 4 +- .../android/docs/CommunicationToken.md | 13 + auto-generated/android/docs/ExecutionApi.md | 14 +- auto-generated/android/docs/FundingApi.md | 6 +- ...{Notification.md => GlobalNotification.md} | 2 +- .../android/docs/GlobalNotificationApi.md | 48 + .../android/docs/InlineResponse200.md | 2 +- auto-generated/android/docs/Instrument.md | 2 + auto-generated/android/docs/InstrumentApi.md | 14 +- auto-generated/android/docs/InsuranceApi.md | 6 +- auto-generated/android/docs/LeaderboardApi.md | 10 +- auto-generated/android/docs/LiquidationApi.md | 6 +- .../android/docs/NotificationApi.md | 48 - auto-generated/android/docs/OrderApi.md | 62 +- auto-generated/android/docs/OrderBookApi.md | 2 +- auto-generated/android/docs/PositionApi.md | 14 +- auto-generated/android/docs/QuoteApi.md | 12 +- auto-generated/android/docs/QuoteFillRatio.md | 16 + auto-generated/android/docs/SchemaApi.md | 2 +- auto-generated/android/docs/SettlementApi.md | 6 +- auto-generated/android/docs/StatsApi.md | 2 +- auto-generated/android/docs/TradeApi.md | 12 +- auto-generated/android/docs/UserApi.md | 346 +-- auto-generated/android/docs/UserCommission.md | 13 - ...onse2001.md => UserCommissionsBySymbol.md} | 3 +- auto-generated/android/docs/UserEvent.md | 32 + auto-generated/android/docs/UserEventApi.md | 52 + .../android/docs/UserPreferences.md | 1 + .../java/io/swagger/client/ApiException.java | 2 +- .../java/io/swagger/client/ApiInvoker.java | 4 +- .../main/java/io/swagger/client/JsonUtil.java | 58 +- .../src/main/java/io/swagger/client/Pair.java | 2 +- .../java/io/swagger/client/api/APIKeyApi.java | 591 +--- .../swagger/client/api/AnnouncementApi.java | 8 +- .../java/io/swagger/client/api/ChatApi.java | 8 +- .../io/swagger/client/api/ExecutionApi.java | 20 +- .../io/swagger/client/api/FundingApi.java | 8 +- ...ionApi.java => GlobalNotificationApi.java} | 30 +- .../io/swagger/client/api/InstrumentApi.java | 21 +- .../io/swagger/client/api/InsuranceApi.java | 8 +- .../io/swagger/client/api/LeaderboardApi.java | 20 +- .../io/swagger/client/api/LiquidationApi.java | 8 +- .../java/io/swagger/client/api/OrderApi.java | 76 +- .../io/swagger/client/api/OrderBookApi.java | 4 +- .../io/swagger/client/api/PositionApi.java | 28 +- .../java/io/swagger/client/api/QuoteApi.java | 16 +- .../java/io/swagger/client/api/SchemaApi.java | 4 +- .../io/swagger/client/api/SettlementApi.java | 8 +- .../java/io/swagger/client/api/StatsApi.java | 4 +- .../java/io/swagger/client/api/TradeApi.java | 16 +- .../java/io/swagger/client/api/UserApi.java | 792 ++--- .../io/swagger/client/api/UserEventApi.java | 183 ++ .../io/swagger/client/auth/ApiKeyAuth.java | 2 +- .../swagger/client/auth/Authentication.java | 2 +- .../io/swagger/client/auth/HttpBasicAuth.java | 2 +- .../java/io/swagger/client/model/APIKey.java | 2 +- .../io/swagger/client/model/AccessToken.java | 2 +- .../io/swagger/client/model/Affiliate.java | 34 +- .../io/swagger/client/model/Announcement.java | 2 +- .../java/io/swagger/client/model/Chat.java | 2 +- .../io/swagger/client/model/ChatChannel.java | 2 +- .../client/model/CommunicationToken.java | 112 + .../swagger/client/model/ConnectedUsers.java | 2 +- .../java/io/swagger/client/model/Error.java | 2 +- .../io/swagger/client/model/ErrorError.java | 2 +- .../io/swagger/client/model/Execution.java | 2 +- .../java/io/swagger/client/model/Funding.java | 2 +- ...ification.java => GlobalNotification.java} | 28 +- .../swagger/client/model/IndexComposite.java | 2 +- .../client/model/InlineResponse200.java | 20 +- .../client/model/InlineResponse2001.java | 63 - .../io/swagger/client/model/Instrument.java | 32 +- .../client/model/InstrumentInterval.java | 2 +- .../io/swagger/client/model/Insurance.java | 2 +- .../io/swagger/client/model/Leaderboard.java | 2 +- .../io/swagger/client/model/Liquidation.java | 2 +- .../java/io/swagger/client/model/Margin.java | 2 +- .../java/io/swagger/client/model/Order.java | 2 +- .../io/swagger/client/model/OrderBookL2.java | 2 +- .../io/swagger/client/model/Position.java | 2 +- .../java/io/swagger/client/model/Quote.java | 2 +- .../swagger/client/model/QuoteFillRatio.java | 157 + .../io/swagger/client/model/Settlement.java | 2 +- .../java/io/swagger/client/model/Stats.java | 2 +- .../io/swagger/client/model/StatsHistory.java | 2 +- .../io/swagger/client/model/StatsUSD.java | 2 +- .../java/io/swagger/client/model/Trade.java | 2 +- .../io/swagger/client/model/TradeBin.java | 2 +- .../io/swagger/client/model/Transaction.java | 2 +- .../java/io/swagger/client/model/User.java | 2 +- .../swagger/client/model/UserCommission.java | 108 - .../client/model/UserCommissionsBySymbol.java | 49 + .../io/swagger/client/model/UserEvent.java | 223 ++ .../swagger/client/model/UserPreferences.java | 17 +- .../java/io/swagger/client/model/Wallet.java | 2 +- .../java/io/swagger/client/model/XAny.java | 2 +- .../swagger/client/request/DeleteRequest.java | 2 +- .../io/swagger/client/request/GetRequest.java | 2 +- .../swagger/client/request/PatchRequest.java | 2 +- .../swagger/client/request/PostRequest.java | 2 +- .../io/swagger/client/request/PutRequest.java | 2 +- .../clojure/.swagger-codegen/VERSION | 2 +- auto-generated/clojure/project.clj | 18 +- .../src/bit_mex_api/api/announcement.clj | 2 +- .../clojure/src/bit_mex_api/api/api_key.clj | 77 +- .../clojure/src/bit_mex_api/api/chat.clj | 2 +- .../clojure/src/bit_mex_api/api/execution.clj | 4 +- ...tification.clj => global_notification.clj} | 16 +- .../src/bit_mex_api/api/instrument.clj | 8 +- .../src/bit_mex_api/api/leaderboard.clj | 2 +- .../clojure/src/bit_mex_api/api/order.clj | 146 +- .../clojure/src/bit_mex_api/api/position.clj | 80 +- .../clojure/src/bit_mex_api/api/quote.clj | 6 +- .../clojure/src/bit_mex_api/api/trade.clj | 10 +- .../clojure/src/bit_mex_api/api/user.clj | 186 +- .../src/bit_mex_api/api/user_event.clj | 23 + .../clojure/src/bit_mex_api/core.clj | 10 +- .../cpprest/.swagger-codegen/VERSION | 2 +- auto-generated/cpprest/ApiClient.cpp | 27 +- auto-generated/cpprest/ApiClient.h | 5 +- auto-generated/cpprest/ApiConfiguration.cpp | 4 +- auto-generated/cpprest/ApiConfiguration.h | 4 +- auto-generated/cpprest/ApiException.cpp | 4 +- auto-generated/cpprest/ApiException.h | 4 +- auto-generated/cpprest/CMakeLists.txt | 2 +- auto-generated/cpprest/HttpContent.cpp | 4 +- auto-generated/cpprest/HttpContent.h | 4 +- auto-generated/cpprest/IHttpBody.h | 4 +- auto-generated/cpprest/JsonBody.cpp | 4 +- auto-generated/cpprest/JsonBody.h | 4 +- auto-generated/cpprest/ModelBase.cpp | 4 +- auto-generated/cpprest/ModelBase.h | 4 +- auto-generated/cpprest/MultipartFormData.cpp | 6 +- auto-generated/cpprest/MultipartFormData.h | 4 +- auto-generated/cpprest/Object.cpp | 4 +- auto-generated/cpprest/Object.h | 4 +- auto-generated/cpprest/api/APIKeyApi.cpp | 647 +--- auto-generated/cpprest/api/APIKeyApi.h | 54 +- .../cpprest/api/AnnouncementApi.cpp | 16 +- auto-generated/cpprest/api/AnnouncementApi.h | 4 +- auto-generated/cpprest/api/ChatApi.cpp | 16 +- auto-generated/cpprest/api/ChatApi.h | 4 +- auto-generated/cpprest/api/ExecutionApi.cpp | 28 +- auto-generated/cpprest/api/ExecutionApi.h | 8 +- auto-generated/cpprest/api/FundingApi.cpp | 4 +- auto-generated/cpprest/api/FundingApi.h | 6 +- ...ationApi.cpp => GlobalNotificationApi.cpp} | 40 +- .../cpprest/api/GlobalNotificationApi.h | 61 + auto-generated/cpprest/api/InstrumentApi.cpp | 10 +- auto-generated/cpprest/api/InstrumentApi.h | 10 +- auto-generated/cpprest/api/InsuranceApi.cpp | 4 +- auto-generated/cpprest/api/InsuranceApi.h | 6 +- auto-generated/cpprest/api/LeaderboardApi.cpp | 20 +- auto-generated/cpprest/api/LeaderboardApi.h | 8 +- auto-generated/cpprest/api/LiquidationApi.cpp | 4 +- auto-generated/cpprest/api/LiquidationApi.h | 6 +- auto-generated/cpprest/api/NotificationApi.h | 61 - auto-generated/cpprest/api/OrderApi.cpp | 112 +- auto-generated/cpprest/api/OrderApi.h | 28 +- auto-generated/cpprest/api/OrderBookApi.cpp | 4 +- auto-generated/cpprest/api/OrderBookApi.h | 4 +- auto-generated/cpprest/api/PositionApi.cpp | 64 +- auto-generated/cpprest/api/PositionApi.h | 6 +- auto-generated/cpprest/api/QuoteApi.cpp | 4 +- auto-generated/cpprest/api/QuoteApi.h | 10 +- auto-generated/cpprest/api/SchemaApi.cpp | 4 +- auto-generated/cpprest/api/SchemaApi.h | 4 +- auto-generated/cpprest/api/SettlementApi.cpp | 4 +- auto-generated/cpprest/api/SettlementApi.h | 6 +- auto-generated/cpprest/api/StatsApi.cpp | 4 +- auto-generated/cpprest/api/StatsApi.h | 4 +- auto-generated/cpprest/api/TradeApi.cpp | 4 +- auto-generated/cpprest/api/TradeApi.h | 10 +- auto-generated/cpprest/api/UserApi.cpp | 844 ++---- auto-generated/cpprest/api/UserApi.h | 117 +- auto-generated/cpprest/api/UserEventApi.cpp | 202 ++ auto-generated/cpprest/api/UserEventApi.h | 65 + auto-generated/cpprest/model/APIKey.cpp | 22 +- auto-generated/cpprest/model/APIKey.h | 4 +- auto-generated/cpprest/model/AccessToken.cpp | 22 +- auto-generated/cpprest/model/AccessToken.h | 4 +- auto-generated/cpprest/model/Affiliate.cpp | 168 +- auto-generated/cpprest/model/Affiliate.h | 22 +- auto-generated/cpprest/model/Announcement.cpp | 28 +- auto-generated/cpprest/model/Announcement.h | 4 +- auto-generated/cpprest/model/Chat.cpp | 22 +- auto-generated/cpprest/model/Chat.h | 4 +- auto-generated/cpprest/model/ChatChannel.cpp | 10 +- auto-generated/cpprest/model/ChatChannel.h | 4 +- .../cpprest/model/CommunicationToken.cpp | 135 + .../cpprest/model/CommunicationToken.h | 89 + .../cpprest/model/ConnectedUsers.cpp | 16 +- auto-generated/cpprest/model/ConnectedUsers.h | 4 +- auto-generated/cpprest/model/Error.cpp | 4 +- auto-generated/cpprest/model/Error.h | 4 +- auto-generated/cpprest/model/Error_error.cpp | 16 +- auto-generated/cpprest/model/Error_error.h | 4 +- auto-generated/cpprest/model/Execution.cpp | 280 +- auto-generated/cpprest/model/Execution.h | 4 +- auto-generated/cpprest/model/Funding.cpp | 22 +- auto-generated/cpprest/model/Funding.h | 4 +- ...otification.cpp => GlobalNotification.cpp} | 120 +- .../{Notification.h => GlobalNotification.h} | 20 +- .../cpprest/model/IndexComposite.cpp | 40 +- auto-generated/cpprest/model/IndexComposite.h | 4 +- .../cpprest/model/Inline_response_200.cpp | 47 +- .../cpprest/model/Inline_response_200.h | 17 +- .../cpprest/model/Inline_response_200_1.cpp | 111 - .../cpprest/model/Inline_response_200_1.h | 74 - auto-generated/cpprest/model/Instrument.cpp | 690 ++++- auto-generated/cpprest/model/Instrument.h | 22 +- .../cpprest/model/InstrumentInterval.cpp | 4 +- .../cpprest/model/InstrumentInterval.h | 4 +- auto-generated/cpprest/model/Insurance.cpp | 10 +- auto-generated/cpprest/model/Insurance.h | 4 +- auto-generated/cpprest/model/Leaderboard.cpp | 16 +- auto-generated/cpprest/model/Leaderboard.h | 4 +- auto-generated/cpprest/model/Liquidation.cpp | 28 +- auto-generated/cpprest/model/Liquidation.h | 4 +- auto-generated/cpprest/model/Margin.cpp | 238 +- auto-generated/cpprest/model/Margin.h | 4 +- auto-generated/cpprest/model/Order.cpp | 196 +- auto-generated/cpprest/model/Order.h | 4 +- auto-generated/cpprest/model/OrderBookL2.cpp | 16 +- auto-generated/cpprest/model/OrderBookL2.h | 4 +- auto-generated/cpprest/model/Position.cpp | 532 +++- auto-generated/cpprest/model/Position.h | 4 +- auto-generated/cpprest/model/Quote.cpp | 28 +- auto-generated/cpprest/model/Quote.h | 4 +- .../cpprest/model/QuoteFillRatio.cpp | 346 +++ auto-generated/cpprest/model/QuoteFillRatio.h | 125 + auto-generated/cpprest/model/Settlement.cpp | 46 +- auto-generated/cpprest/model/Settlement.h | 4 +- auto-generated/cpprest/model/Stats.cpp | 34 +- auto-generated/cpprest/model/Stats.h | 4 +- auto-generated/cpprest/model/StatsHistory.cpp | 22 +- auto-generated/cpprest/model/StatsHistory.h | 4 +- auto-generated/cpprest/model/StatsUSD.cpp | 34 +- auto-generated/cpprest/model/StatsUSD.h | 4 +- auto-generated/cpprest/model/Trade.cpp | 52 +- auto-generated/cpprest/model/Trade.h | 4 +- auto-generated/cpprest/model/TradeBin.cpp | 70 +- auto-generated/cpprest/model/TradeBin.h | 4 +- auto-generated/cpprest/model/Transaction.cpp | 70 +- auto-generated/cpprest/model/Transaction.h | 4 +- auto-generated/cpprest/model/User.cpp | 93 +- auto-generated/cpprest/model/User.h | 4 +- .../cpprest/model/UserCommission.cpp | 227 -- auto-generated/cpprest/model/UserCommission.h | 100 - .../cpprest/model/UserCommissionsBySymbol.cpp | 71 + .../cpprest/model/UserCommissionsBySymbol.h | 64 + auto-generated/cpprest/model/UserEvent.cpp | 424 +++ auto-generated/cpprest/model/UserEvent.h | 150 + .../cpprest/model/UserPreferences.cpp | 196 +- .../cpprest/model/UserPreferences.h | 13 +- auto-generated/cpprest/model/Wallet.cpp | 136 +- auto-generated/cpprest/model/Wallet.h | 4 +- auto-generated/cpprest/model/X-any.cpp | 4 +- auto-generated/cpprest/model/X-any.h | 4 +- .../csharp/.swagger-codegen/VERSION | 2 +- auto-generated/csharp/IO.Swagger.sln | 10 +- auto-generated/csharp/README.md | 55 +- auto-generated/csharp/docs/APIKeyApi.md | 314 +- auto-generated/csharp/docs/Affiliate.md | 2 + auto-generated/csharp/docs/AnnouncementApi.md | 12 +- auto-generated/csharp/docs/ChatApi.md | 12 +- .../csharp/docs/CommunicationToken.md | 12 + auto-generated/csharp/docs/ExecutionApi.md | 30 +- auto-generated/csharp/docs/FundingApi.md | 6 +- ...{Notification.md => GlobalNotification.md} | 2 +- ...icationApi.md => GlobalNotificationApi.md} | 36 +- .../csharp/docs/InlineResponse200.md | 2 +- auto-generated/csharp/docs/Instrument.md | 2 + auto-generated/csharp/docs/InstrumentApi.md | 14 +- auto-generated/csharp/docs/InsuranceApi.md | 6 +- auto-generated/csharp/docs/LeaderboardApi.md | 18 +- auto-generated/csharp/docs/LiquidationApi.md | 6 +- auto-generated/csharp/docs/OrderApi.md | 134 +- auto-generated/csharp/docs/OrderBookApi.md | 2 +- auto-generated/csharp/docs/PositionApi.md | 54 +- auto-generated/csharp/docs/QuoteApi.md | 12 +- auto-generated/csharp/docs/QuoteFillRatio.md | 15 + auto-generated/csharp/docs/SchemaApi.md | 2 +- auto-generated/csharp/docs/SettlementApi.md | 6 +- auto-generated/csharp/docs/StatsApi.md | 2 +- auto-generated/csharp/docs/TradeApi.md | 12 +- auto-generated/csharp/docs/UserApi.md | 588 ++-- auto-generated/csharp/docs/UserCommission.md | 12 - ...onse2001.md => UserCommissionsBySymbol.md} | 3 +- auto-generated/csharp/docs/UserEvent.md | 19 + auto-generated/csharp/docs/UserEventApi.md | 83 + auto-generated/csharp/docs/UserPreferences.md | 1 + .../src/IO.Swagger.Test/Api/APIKeyApiTests.cs | 54 +- .../Api/AnnouncementApiTests.cs | 2 +- .../src/IO.Swagger.Test/Api/ChatApiTests.cs | 2 +- .../IO.Swagger.Test/Api/ExecutionApiTests.cs | 2 +- .../IO.Swagger.Test/Api/FundingApiTests.cs | 2 +- .../Api/GlobalNotificationApiTests.cs | 80 + .../IO.Swagger.Test/Api/InstrumentApiTests.cs | 5 +- .../IO.Swagger.Test/Api/InsuranceApiTests.cs | 2 +- .../Api/LeaderboardApiTests.cs | 4 +- .../Api/LiquidationApiTests.cs | 2 +- .../Api/NotificationApiTests.cs | 80 - .../src/IO.Swagger.Test/Api/OrderApiTests.cs | 2 +- .../IO.Swagger.Test/Api/OrderBookApiTests.cs | 2 +- .../IO.Swagger.Test/Api/PositionApiTests.cs | 2 +- .../src/IO.Swagger.Test/Api/QuoteApiTests.cs | 2 +- .../src/IO.Swagger.Test/Api/SchemaApiTests.cs | 2 +- .../IO.Swagger.Test/Api/SettlementApiTests.cs | 2 +- .../src/IO.Swagger.Test/Api/StatsApiTests.cs | 2 +- .../src/IO.Swagger.Test/Api/TradeApiTests.cs | 2 +- .../src/IO.Swagger.Test/Api/UserApiTests.cs | 108 +- .../IO.Swagger.Test/Api/UserEventApiTests.cs | 82 + .../IO.Swagger.Test/IO.Swagger.Test.csproj | 4 +- .../src/IO.Swagger.Test/Model/APIKeyTests.cs | 2 +- .../IO.Swagger.Test/Model/AccessTokenTests.cs | 2 +- .../IO.Swagger.Test/Model/AffiliateTests.cs | 18 +- .../Model/AnnouncementTests.cs | 2 +- .../IO.Swagger.Test/Model/ChatChannelTests.cs | 2 +- .../src/IO.Swagger.Test/Model/ChatTests.cs | 2 +- .../Model/CommunicationTokenTests.cs | 104 + .../Model/ConnectedUsersTests.cs | 2 +- .../IO.Swagger.Test/Model/ErrorErrorTests.cs | 2 +- .../src/IO.Swagger.Test/Model/ErrorTests.cs | 2 +- .../IO.Swagger.Test/Model/ExecutionTests.cs | 2 +- .../src/IO.Swagger.Test/Model/FundingTests.cs | 2 +- ...ionTests.cs => GlobalNotificationTests.cs} | 22 +- .../Model/IndexCompositeTests.cs | 2 +- .../Model/InlineResponse2001Tests.cs | 80 - .../Model/InlineResponse200Tests.cs | 8 +- .../Model/InstrumentIntervalTests.cs | 2 +- .../IO.Swagger.Test/Model/InstrumentTests.cs | 18 +- .../IO.Swagger.Test/Model/InsuranceTests.cs | 2 +- .../IO.Swagger.Test/Model/LeaderboardTests.cs | 2 +- .../IO.Swagger.Test/Model/LiquidationTests.cs | 2 +- .../src/IO.Swagger.Test/Model/MarginTests.cs | 2 +- .../IO.Swagger.Test/Model/OrderBookL2Tests.cs | 2 +- .../src/IO.Swagger.Test/Model/OrderTests.cs | 2 +- .../IO.Swagger.Test/Model/PositionTests.cs | 2 +- .../Model/QuoteFillRatioTests.cs | 128 + .../src/IO.Swagger.Test/Model/QuoteTests.cs | 2 +- .../IO.Swagger.Test/Model/SettlementTests.cs | 2 +- .../Model/StatsHistoryTests.cs | 2 +- .../src/IO.Swagger.Test/Model/StatsTests.cs | 2 +- .../IO.Swagger.Test/Model/StatsUSDTests.cs | 2 +- .../IO.Swagger.Test/Model/TradeBinTests.cs | 2 +- .../src/IO.Swagger.Test/Model/TradeTests.cs | 2 +- .../IO.Swagger.Test/Model/TransactionTests.cs | 2 +- .../Model/UserCommissionTests.cs | 104 - .../Model/UserCommissionsBySymbolTests.cs | 72 + .../IO.Swagger.Test/Model/UserEventTests.cs | 160 + .../Model/UserPreferencesTests.cs | 10 +- .../src/IO.Swagger.Test/Model/UserTests.cs | 2 +- .../src/IO.Swagger.Test/Model/WalletTests.cs | 2 +- .../src/IO.Swagger.Test/Model/XAnyTests.cs | 2 +- .../csharp/src/IO.Swagger/Api/APIKeyApi.cs | 980 +----- .../src/IO.Swagger/Api/AnnouncementApi.cs | 22 +- .../csharp/src/IO.Swagger/Api/ChatApi.cs | 22 +- .../csharp/src/IO.Swagger/Api/ExecutionApi.cs | 74 +- .../csharp/src/IO.Swagger/Api/FundingApi.cs | 18 +- ...icationApi.cs => GlobalNotificationApi.cs} | 102 +- .../src/IO.Swagger/Api/InstrumentApi.cs | 64 +- .../csharp/src/IO.Swagger/Api/InsuranceApi.cs | 18 +- .../src/IO.Swagger/Api/LeaderboardApi.cs | 66 +- .../src/IO.Swagger/Api/LiquidationApi.cs | 18 +- .../csharp/src/IO.Swagger/Api/OrderApi.cs | 374 +-- .../csharp/src/IO.Swagger/Api/OrderBookApi.cs | 2 +- .../csharp/src/IO.Swagger/Api/PositionApi.cs | 118 +- .../csharp/src/IO.Swagger/Api/QuoteApi.cs | 50 +- .../csharp/src/IO.Swagger/Api/SchemaApi.cs | 2 +- .../src/IO.Swagger/Api/SettlementApi.cs | 18 +- .../csharp/src/IO.Swagger/Api/StatsApi.cs | 2 +- .../csharp/src/IO.Swagger/Api/TradeApi.cs | 50 +- .../csharp/src/IO.Swagger/Api/UserApi.cs | 1768 +++++------ .../csharp/src/IO.Swagger/Api/UserEventApi.cs | 351 +++ .../csharp/src/IO.Swagger/Client/ApiClient.cs | 8 +- .../src/IO.Swagger/Client/ApiException.cs | 2 +- .../src/IO.Swagger/Client/ApiResponse.cs | 2 +- .../src/IO.Swagger/Client/Configuration.cs | 6 +- .../src/IO.Swagger/Client/ExceptionFactory.cs | 2 +- .../IO.Swagger/Client/GlobalConfiguration.cs | 2 +- .../src/IO.Swagger/Client/IApiAccessor.cs | 2 +- .../Client/IReadableConfiguration.cs | 2 +- .../IO.Swagger/Client/SwaggerDateConverter.cs | 2 +- .../csharp/src/IO.Swagger/IO.Swagger.csproj | 4 +- .../csharp/src/IO.Swagger/Model/APIKey.cs | 2 +- .../src/IO.Swagger/Model/AccessToken.cs | 2 +- .../csharp/src/IO.Swagger/Model/Affiliate.cs | 36 +- .../src/IO.Swagger/Model/Announcement.cs | 2 +- .../csharp/src/IO.Swagger/Model/Chat.cs | 2 +- .../src/IO.Swagger/Model/ChatChannel.cs | 2 +- .../IO.Swagger/Model/CommunicationToken.cs | 209 ++ .../src/IO.Swagger/Model/ConnectedUsers.cs | 2 +- .../csharp/src/IO.Swagger/Model/Error.cs | 2 +- .../csharp/src/IO.Swagger/Model/ErrorError.cs | 2 +- .../csharp/src/IO.Swagger/Model/Execution.cs | 2 +- .../csharp/src/IO.Swagger/Model/Funding.cs | 2 +- ...{Notification.cs => GlobalNotification.cs} | 30 +- .../src/IO.Swagger/Model/IndexComposite.cs | 2 +- .../src/IO.Swagger/Model/InlineResponse200.cs | 26 +- .../IO.Swagger/Model/InlineResponse2001.cs | 124 - .../csharp/src/IO.Swagger/Model/Instrument.cs | 36 +- .../IO.Swagger/Model/InstrumentInterval.cs | 2 +- .../csharp/src/IO.Swagger/Model/Insurance.cs | 2 +- .../src/IO.Swagger/Model/Leaderboard.cs | 2 +- .../src/IO.Swagger/Model/Liquidation.cs | 2 +- .../csharp/src/IO.Swagger/Model/Margin.cs | 2 +- .../csharp/src/IO.Swagger/Model/Order.cs | 2 +- .../src/IO.Swagger/Model/OrderBookL2.cs | 2 +- .../csharp/src/IO.Swagger/Model/Position.cs | 2 +- .../csharp/src/IO.Swagger/Model/Quote.cs | 2 +- .../src/IO.Swagger/Model/QuoteFillRatio.cs | 233 ++ .../csharp/src/IO.Swagger/Model/Settlement.cs | 2 +- .../csharp/src/IO.Swagger/Model/Stats.cs | 2 +- .../src/IO.Swagger/Model/StatsHistory.cs | 2 +- .../csharp/src/IO.Swagger/Model/StatsUSD.cs | 2 +- .../csharp/src/IO.Swagger/Model/Trade.cs | 2 +- .../csharp/src/IO.Swagger/Model/TradeBin.cs | 2 +- .../src/IO.Swagger/Model/Transaction.cs | 2 +- .../csharp/src/IO.Swagger/Model/User.cs | 2 +- .../src/IO.Swagger/Model/UserCommission.cs | 172 -- .../Model/UserCommissionsBySymbol.cs | 109 + .../csharp/src/IO.Swagger/Model/UserEvent.cs | 525 ++++ .../src/IO.Swagger/Model/UserPreferences.cs | 20 +- .../csharp/src/IO.Swagger/Model/Wallet.cs | 2 +- .../csharp/src/IO.Swagger/Model/XAny.cs | 2 +- auto-generated/go/.swagger-codegen/VERSION | 2 +- auto-generated/go/README.md | 31 +- auto-generated/go/api/swagger.yaml | 1915 +++++++----- auto-generated/go/api_announcement.go | 28 +- auto-generated/go/api_api_key.go | 692 +---- auto-generated/go/api_chat.go | 50 +- auto-generated/go/api_execution.go | 36 +- auto-generated/go/api_funding.go | 15 +- ...fication.go => api_global_notification.go} | 31 +- auto-generated/go/api_instrument.go | 77 +- auto-generated/go/api_insurance.go | 15 +- auto-generated/go/api_leaderboard.go | 36 +- auto-generated/go/api_liquidation.go | 15 +- auto-generated/go/api_order.go | 161 +- auto-generated/go/api_order_book.go | 13 +- auto-generated/go/api_position.go | 79 +- auto-generated/go/api_quote.go | 29 +- auto-generated/go/api_schema.go | 24 +- auto-generated/go/api_settlement.go | 15 +- auto-generated/go/api_stats.go | 35 +- auto-generated/go/api_trade.go | 29 +- auto-generated/go/api_user.go | 1580 ++++++---- auto-generated/go/api_user_event.go | 211 ++ auto-generated/go/client.go | 11 +- auto-generated/go/configuration.go | 4 +- auto-generated/go/docs/APIKeyApi.md | 125 +- auto-generated/go/docs/Affiliate.md | 2 + auto-generated/go/docs/AnnouncementApi.md | 4 +- auto-generated/go/docs/ChatApi.md | 4 +- .../docs/CommunicationToken.md} | 10 +- auto-generated/go/docs/ExecutionApi.md | 10 +- auto-generated/go/docs/FundingApi.md | 4 +- ...{Notification.md => GlobalNotification.md} | 2 +- ...icationApi.md => GlobalNotificationApi.md} | 16 +- auto-generated/go/docs/InlineResponse200.md | 2 +- auto-generated/go/docs/Instrument.md | 2 + auto-generated/go/docs/InstrumentApi.md | 7 +- auto-generated/go/docs/InsuranceApi.md | 4 +- auto-generated/go/docs/LeaderboardApi.md | 8 +- auto-generated/go/docs/LiquidationApi.md | 4 +- auto-generated/go/docs/OrderApi.md | 44 +- auto-generated/go/docs/OrderBookApi.md | 2 +- auto-generated/go/docs/PositionApi.md | 14 +- auto-generated/go/docs/QuoteApi.md | 8 +- auto-generated/go/docs/QuoteFillRatio.md | 16 + auto-generated/go/docs/SchemaApi.md | 2 +- auto-generated/go/docs/SettlementApi.md | 4 +- auto-generated/go/docs/StatsApi.md | 2 +- auto-generated/go/docs/TradeApi.md | 8 +- auto-generated/go/docs/UserApi.md | 254 +- auto-generated/go/docs/UserCommission.md | 13 - .../docs/UserCommissionsBySymbol.md} | 3 +- auto-generated/go/docs/UserEvent.md | 20 + auto-generated/go/docs/UserEventApi.md | 43 + auto-generated/go/docs/UserPreferences.md | 1 + auto-generated/go/model_access_token.go | 2 +- auto-generated/go/model_affiliate.go | 4 +- auto-generated/go/model_announcement.go | 2 +- auto-generated/go/model_api_key.go | 2 +- auto-generated/go/model_chat.go | 2 +- auto-generated/go/model_chat_channel.go | 2 +- .../go/model_communication_token.go | 19 + auto-generated/go/model_connected_users.go | 2 +- auto-generated/go/model_error.go | 2 +- auto-generated/go/model_error_error.go | 2 +- auto-generated/go/model_execution.go | 2 +- auto-generated/go/model_funding.go | 2 +- .../go/model_global_notification.go | 29 + auto-generated/go/model_index_composite.go | 2 +- .../go/model_inline_response_200.go | 4 +- .../go/model_inline_response_200_1.go | 15 - auto-generated/go/model_instrument.go | 4 +- .../go/model_instrument_interval.go | 2 +- auto-generated/go/model_insurance.go | 2 +- auto-generated/go/model_leaderboard.go | 2 +- auto-generated/go/model_liquidation.go | 2 +- auto-generated/go/model_margin.go | 2 +- auto-generated/go/model_notification.go | 29 - auto-generated/go/model_order.go | 2 +- auto-generated/go/model_order_book_l2.go | 2 +- auto-generated/go/model_position.go | 2 +- auto-generated/go/model_quote.go | 2 +- auto-generated/go/model_quote_fill_ratio.go | 26 + auto-generated/go/model_settlement.go | 2 +- auto-generated/go/model_stats.go | 2 +- auto-generated/go/model_stats_history.go | 2 +- auto-generated/go/model_stats_usd.go | 2 +- auto-generated/go/model_trade.go | 2 +- auto-generated/go/model_trade_bin.go | 2 +- auto-generated/go/model_transaction.go | 2 +- auto-generated/go/model_user.go | 2 +- auto-generated/go/model_user_commission.go | 18 - .../go/model_user_commissions_by_symbol.go | 14 + auto-generated/go/model_user_event.go | 30 + auto-generated/go/model_user_preferences.go | 3 +- auto-generated/go/model_wallet.go | 2 +- auto-generated/go/model_x_any.go | 2 +- auto-generated/go/response.go | 2 +- auto-generated/java/.swagger-codegen/VERSION | 2 +- auto-generated/java/README.md | 37 +- auto-generated/java/docs/Affiliate.md | 2 + auto-generated/java/docs/AnnouncementApi.md | 16 +- auto-generated/java/docs/ApiKeyApi.md | 290 +- auto-generated/java/docs/ChatApi.md | 16 +- .../java/docs/CommunicationToken.md | 13 + auto-generated/java/docs/ExecutionApi.md | 46 +- auto-generated/java/docs/FundingApi.md | 10 +- ...{Notification.md => GlobalNotification.md} | 2 +- ...icationApi.md => GlobalNotificationApi.md} | 38 +- auto-generated/java/docs/InlineResponse200.md | 2 +- auto-generated/java/docs/Instrument.md | 2 + auto-generated/java/docs/InstrumentApi.md | 22 +- auto-generated/java/docs/InsuranceApi.md | 10 +- auto-generated/java/docs/LeaderboardApi.md | 22 +- auto-generated/java/docs/LiquidationApi.md | 10 +- auto-generated/java/docs/OrderApi.md | 174 +- auto-generated/java/docs/OrderBookApi.md | 2 +- auto-generated/java/docs/PositionApi.md | 74 +- auto-generated/java/docs/QuoteApi.md | 20 +- auto-generated/java/docs/QuoteFillRatio.md | 16 + auto-generated/java/docs/SchemaApi.md | 2 +- auto-generated/java/docs/SettlementApi.md | 10 +- auto-generated/java/docs/StatsApi.md | 2 +- auto-generated/java/docs/TradeApi.md | 20 +- auto-generated/java/docs/UserApi.md | 600 ++-- auto-generated/java/docs/UserCommission.md | 13 - ...onse2001.md => UserCommissionsBySymbol.md} | 3 +- auto-generated/java/docs/UserEvent.md | 59 + auto-generated/java/docs/UserEventApi.md | 76 + auto-generated/java/docs/UserPreferences.md | 1 + .../java/io/swagger/client/ApiCallback.java | 2 +- .../java/io/swagger/client/ApiClient.java | 8 +- .../java/io/swagger/client/ApiException.java | 4 +- .../java/io/swagger/client/ApiResponse.java | 2 +- .../java/io/swagger/client/Configuration.java | 4 +- .../client/GzipRequestInterceptor.java | 2 +- .../src/main/java/io/swagger/client/JSON.java | 3 +- .../src/main/java/io/swagger/client/Pair.java | 4 +- .../swagger/client/ProgressRequestBody.java | 2 +- .../swagger/client/ProgressResponseBody.java | 2 +- .../java/io/swagger/client/StringUtil.java | 4 +- .../swagger/client/api/AnnouncementApi.java | 4 +- .../java/io/swagger/client/api/ApiKeyApi.java | 520 +--- .../java/io/swagger/client/api/ChatApi.java | 4 +- .../io/swagger/client/api/ExecutionApi.java | 22 +- .../io/swagger/client/api/FundingApi.java | 10 +- ...ionApi.java => GlobalNotificationApi.java} | 48 +- .../io/swagger/client/api/InstrumentApi.java | 40 +- .../io/swagger/client/api/InsuranceApi.java | 10 +- .../io/swagger/client/api/LeaderboardApi.java | 22 +- .../io/swagger/client/api/LiquidationApi.java | 10 +- .../java/io/swagger/client/api/OrderApi.java | 110 +- .../io/swagger/client/api/OrderBookApi.java | 2 +- .../io/swagger/client/api/PositionApi.java | 18 +- .../java/io/swagger/client/api/QuoteApi.java | 24 +- .../java/io/swagger/client/api/SchemaApi.java | 2 +- .../io/swagger/client/api/SettlementApi.java | 10 +- .../java/io/swagger/client/api/StatsApi.java | 2 +- .../java/io/swagger/client/api/TradeApi.java | 24 +- .../java/io/swagger/client/api/UserApi.java | 874 ++---- .../io/swagger/client/api/UserEventApi.java | 183 ++ .../io/swagger/client/auth/ApiKeyAuth.java | 4 +- .../swagger/client/auth/Authentication.java | 2 +- .../io/swagger/client/auth/HttpBasicAuth.java | 2 +- .../java/io/swagger/client/auth/OAuth.java | 4 +- .../io/swagger/client/auth/OAuthFlow.java | 2 +- .../java/io/swagger/client/model/APIKey.java | 4 +- .../io/swagger/client/model/AccessToken.java | 4 +- .../io/swagger/client/model/Affiliate.java | 54 +- .../io/swagger/client/model/Announcement.java | 4 +- .../java/io/swagger/client/model/Chat.java | 4 +- .../io/swagger/client/model/ChatChannel.java | 4 +- .../client/model/CommunicationToken.java | 165 ++ .../swagger/client/model/ConnectedUsers.java | 4 +- .../java/io/swagger/client/model/Error.java | 4 +- .../io/swagger/client/model/ErrorError.java | 4 +- .../io/swagger/client/model/Execution.java | 4 +- .../java/io/swagger/client/model/Funding.java | 4 +- ...ification.java => GlobalNotification.java} | 50 +- .../swagger/client/model/IndexComposite.java | 4 +- .../client/model/InlineResponse200.java | 30 +- .../client/model/InlineResponse2001.java | 94 - .../io/swagger/client/model/Instrument.java | 52 +- .../client/model/InstrumentInterval.java | 4 +- .../io/swagger/client/model/Insurance.java | 4 +- .../io/swagger/client/model/Leaderboard.java | 4 +- .../io/swagger/client/model/Liquidation.java | 4 +- .../java/io/swagger/client/model/Margin.java | 4 +- .../java/io/swagger/client/model/Order.java | 4 +- .../io/swagger/client/model/OrderBookL2.java | 4 +- .../io/swagger/client/model/Position.java | 4 +- .../java/io/swagger/client/model/Quote.java | 4 +- .../swagger/client/model/QuoteFillRatio.java | 234 ++ .../io/swagger/client/model/Settlement.java | 4 +- .../java/io/swagger/client/model/Stats.java | 4 +- .../io/swagger/client/model/StatsHistory.java | 4 +- .../io/swagger/client/model/StatsUSD.java | 4 +- .../java/io/swagger/client/model/Trade.java | 4 +- .../io/swagger/client/model/TradeBin.java | 4 +- .../io/swagger/client/model/Transaction.java | 4 +- .../java/io/swagger/client/model/User.java | 4 +- .../swagger/client/model/UserCommission.java | 163 - .../client/model/UserCommissionsBySymbol.java | 63 + .../io/swagger/client/model/UserEvent.java | 466 +++ .../swagger/client/model/UserPreferences.java | 37 +- .../java/io/swagger/client/model/Wallet.java | 4 +- .../java/io/swagger/client/model/XAny.java | 4 +- .../client/api/AnnouncementApiTest.java | 2 +- .../io/swagger/client/api/ApiKeyApiTest.java | 71 +- .../io/swagger/client/api/ChatApiTest.java | 2 +- .../swagger/client/api/ExecutionApiTest.java | 2 +- .../io/swagger/client/api/FundingApiTest.java | 2 +- .../client/api/GlobalNotificationApiTest.java | 51 + .../swagger/client/api/InstrumentApiTest.java | 7 +- .../swagger/client/api/InsuranceApiTest.java | 2 +- .../client/api/LeaderboardApiTest.java | 6 +- .../client/api/LiquidationApiTest.java | 2 +- .../client/api/NotificationApiTest.java | 51 - .../io/swagger/client/api/OrderApiTest.java | 8 +- .../swagger/client/api/OrderBookApiTest.java | 2 +- .../swagger/client/api/PositionApiTest.java | 4 +- .../io/swagger/client/api/QuoteApiTest.java | 4 +- .../io/swagger/client/api/SchemaApiTest.java | 2 +- .../swagger/client/api/SettlementApiTest.java | 2 +- .../io/swagger/client/api/StatsApiTest.java | 2 +- .../io/swagger/client/api/TradeApiTest.java | 4 +- .../io/swagger/client/api/UserApiTest.java | 134 +- .../swagger/client/api/UserEventApiTest.java | 53 + .../javascript/.swagger-codegen/VERSION | 2 +- auto-generated/javascript/README.md | 64 +- auto-generated/javascript/docs/APIKeyApi.md | 283 +- auto-generated/javascript/docs/Affiliate.md | 2 + .../javascript/docs/AnnouncementApi.md | 16 +- auto-generated/javascript/docs/ChatApi.md | 16 +- .../javascript/docs/CommunicationToken.md | 11 + .../javascript/docs/ExecutionApi.md | 44 +- auto-generated/javascript/docs/FundingApi.md | 8 +- ...{Notification.md => GlobalNotification.md} | 2 +- ...icationApi.md => GlobalNotificationApi.md} | 34 +- .../javascript/docs/InlineResponse200.md | 2 +- auto-generated/javascript/docs/Instrument.md | 2 + .../javascript/docs/InstrumentApi.md | 22 +- .../javascript/docs/InsuranceApi.md | 8 +- .../javascript/docs/LeaderboardApi.md | 22 +- .../javascript/docs/LiquidationApi.md | 8 +- auto-generated/javascript/docs/OrderApi.md | 212 +- .../javascript/docs/OrderBookApi.md | 2 +- auto-generated/javascript/docs/PositionApi.md | 78 +- auto-generated/javascript/docs/QuoteApi.md | 16 +- .../javascript/docs/QuoteFillRatio.md | 14 + auto-generated/javascript/docs/SchemaApi.md | 6 +- .../javascript/docs/SettlementApi.md | 8 +- auto-generated/javascript/docs/StatsApi.md | 2 +- auto-generated/javascript/docs/TradeApi.md | 18 +- auto-generated/javascript/docs/UserApi.md | 604 ++-- .../javascript/docs/UserCommission.md | 11 - ...onse2001.md => UserCommissionsBySymbol.md} | 3 +- auto-generated/javascript/docs/UserEvent.md | 86 + .../javascript/docs/UserEventApi.md | 75 + .../javascript/docs/UserPreferences.md | 3 +- auto-generated/javascript/package.json | 7 +- auto-generated/javascript/src/ApiClient.js | 23 +- .../javascript/src/api/APIKeyApi.js | 210 +- .../javascript/src/api/AnnouncementApi.js | 8 +- auto-generated/javascript/src/api/ChatApi.js | 8 +- .../javascript/src/api/ExecutionApi.js | 20 +- .../javascript/src/api/FundingApi.js | 10 +- .../src/api/GlobalNotificationApi.js | 94 + .../javascript/src/api/InstrumentApi.js | 22 +- .../javascript/src/api/InsuranceApi.js | 10 +- .../javascript/src/api/LeaderboardApi.js | 24 +- .../javascript/src/api/LiquidationApi.js | 10 +- .../javascript/src/api/NotificationApi.js | 94 - auto-generated/javascript/src/api/OrderApi.js | 88 +- .../javascript/src/api/OrderBookApi.js | 6 +- .../javascript/src/api/PositionApi.js | 22 +- auto-generated/javascript/src/api/QuoteApi.js | 15 +- .../javascript/src/api/SchemaApi.js | 8 +- .../javascript/src/api/SettlementApi.js | 10 +- auto-generated/javascript/src/api/StatsApi.js | 6 +- auto-generated/javascript/src/api/TradeApi.js | 17 +- auto-generated/javascript/src/api/UserApi.js | 405 +-- .../javascript/src/api/UserEventApi.js | 99 + auto-generated/javascript/src/index.js | 67 +- auto-generated/javascript/src/model/APIKey.js | 102 +- .../javascript/src/model/AccessToken.js | 53 +- .../javascript/src/model/Affiliate.js | 163 +- .../javascript/src/model/Announcement.js | 64 +- auto-generated/javascript/src/model/Chat.js | 85 +- .../javascript/src/model/ChatChannel.js | 35 +- .../src/model/CommunicationToken.js | 101 + .../javascript/src/model/ConnectedUsers.js | 34 +- auto-generated/javascript/src/model/Error.js | 26 +- .../javascript/src/model/ErrorError.js | 34 +- .../javascript/src/model/Execution.js | 440 ++- .../javascript/src/model/Funding.js | 63 +- .../src/model/GlobalNotification.js | 172 ++ .../javascript/src/model/IndexComposite.js | 80 +- .../javascript/src/model/InlineResponse200.js | 27 +- .../src/model/InlineResponse2001.js | 82 - .../javascript/src/model/Instrument.js | 940 +++--- .../src/model/InstrumentInterval.js | 36 +- .../javascript/src/model/Insurance.js | 45 +- .../javascript/src/model/Leaderboard.js | 44 +- .../javascript/src/model/Liquidation.js | 62 +- auto-generated/javascript/src/model/Margin.js | 387 ++- .../javascript/src/model/Notification.js | 184 -- auto-generated/javascript/src/model/Order.js | 314 +- .../javascript/src/model/OrderBookL2.js | 64 +- .../javascript/src/model/Position.js | 838 +++--- auto-generated/javascript/src/model/Quote.js | 74 +- .../javascript/src/model/QuoteFillRatio.js | 116 + .../javascript/src/model/Settlement.js | 99 +- auto-generated/javascript/src/model/Stats.js | 71 +- .../javascript/src/model/StatsHistory.js | 65 +- .../javascript/src/model/StatsUSD.js | 71 +- auto-generated/javascript/src/model/Trade.js | 110 +- .../javascript/src/model/TradeBin.js | 135 +- .../javascript/src/model/Transaction.js | 125 +- auto-generated/javascript/src/model/User.js | 173 +- .../javascript/src/model/UserCommission.js | 106 - .../src/model/UserCommissionsBySymbol.js | 64 + .../javascript/src/model/UserEvent.js | 330 +++ .../javascript/src/model/UserPreferences.js | 257 +- auto-generated/javascript/src/model/Wallet.js | 243 +- auto-generated/javascript/src/model/XAny.js | 18 +- .../javascript/test/api/APIKeyApi.spec.js | 121 +- .../test/api/AnnouncementApi.spec.js | 110 +- .../javascript/test/api/ChatApi.spec.js | 188 +- .../javascript/test/api/ExecutionApi.spec.js | 294 +- .../javascript/test/api/FundingApi.spec.js | 73 +- .../test/api/GlobalNotificationApi.spec.js | 88 + .../javascript/test/api/InstrumentApi.spec.js | 1094 ++++++- .../javascript/test/api/InsuranceApi.spec.js | 69 +- .../test/api/LeaderboardApi.spec.js | 92 +- .../test/api/LiquidationApi.spec.js | 73 +- .../test/api/NotificationApi.spec.js | 66 - .../javascript/test/api/OrderApi.spec.js | 885 +++++- .../javascript/test/api/OrderBookApi.spec.js | 67 +- .../javascript/test/api/PositionApi.spec.js | 1089 ++++++- .../javascript/test/api/QuoteApi.spec.js | 132 +- .../javascript/test/api/SchemaApi.spec.js | 80 +- .../javascript/test/api/SettlementApi.spec.js | 81 +- .../javascript/test/api/StatsApi.spec.js | 156 +- .../javascript/test/api/TradeApi.spec.js | 154 +- .../javascript/test/api/UserApi.spec.js | 1219 ++++++-- .../javascript/test/api/UserEventApi.spec.js | 93 + .../javascript/test/assert-equals.js | 81 + .../javascript/test/model/APIKey.spec.js | 149 +- .../javascript/test/model/AccessToken.spec.js | 79 +- .../javascript/test/model/Affiliate.spec.js | 233 +- .../test/model/Announcement.spec.js | 89 +- .../javascript/test/model/Chat.spec.js | 109 +- .../javascript/test/model/ChatChannel.spec.js | 65 +- .../test/model/CommunicationToken.spec.js | 71 + .../test/model/ConnectedUsers.spec.js | 65 +- .../javascript/test/model/Error.spec.js | 49 +- .../javascript/test/model/ErrorError.spec.js | 65 +- .../javascript/test/model/Execution.spec.js | 605 ++-- .../javascript/test/model/Funding.spec.js | 89 +- .../test/model/GlobalNotification.spec.js | 107 + .../test/model/IndexComposite.spec.js | 109 +- .../test/model/InlineResponse200.spec.js | 49 +- .../test/model/InlineResponse2001.spec.js | 68 - .../javascript/test/model/Instrument.spec.js | 1265 ++++---- .../test/model/InstrumentInterval.spec.js | 65 +- .../javascript/test/model/Insurance.spec.js | 69 +- .../javascript/test/model/Leaderboard.spec.js | 69 +- .../javascript/test/model/Liquidation.spec.js | 89 +- .../javascript/test/model/Margin.spec.js | 533 ++-- .../test/model/Notification.spec.js | 122 - .../javascript/test/model/Order.spec.js | 437 ++- .../javascript/test/model/OrderBookL2.spec.js | 89 +- .../javascript/test/model/Position.spec.js | 1133 ++++--- .../javascript/test/model/Quote.spec.js | 99 +- .../test/model/QuoteFillRatio.spec.js | 89 + .../javascript/test/model/Settlement.spec.js | 149 +- .../javascript/test/model/Stats.spec.js | 99 +- .../test/model/StatsHistory.spec.js | 89 +- .../javascript/test/model/StatsUSD.spec.js | 99 +- .../javascript/test/model/Trade.spec.js | 161 +- .../javascript/test/model/TradeBin.spec.js | 197 +- .../javascript/test/model/Transaction.spec.js | 185 +- .../javascript/test/model/User.spec.js | 245 +- .../test/model/UserCommission.spec.js | 86 - .../model/UserCommissionsBySymbol.spec.js | 47 + .../javascript/test/model/UserEvent.spec.js | 113 + .../test/model/UserPreferences.spec.js | 359 ++- .../javascript/test/model/Wallet.spec.js | 341 +-- .../javascript/test/model/XAny.spec.js | 39 +- auto-generated/objc/.swagger-codegen/VERSION | 2 +- auto-generated/objc/README.md | 64 +- auto-generated/objc/SwaggerClient.podspec | 2 +- .../objc/SwaggerClient/Api/SWGAPIKeyApi.h | 72 +- .../objc/SwaggerClient/Api/SWGAPIKeyApi.m | 288 +- .../SwaggerClient/Api/SWGAnnouncementApi.h | 4 +- .../SwaggerClient/Api/SWGAnnouncementApi.m | 2 +- .../objc/SwaggerClient/Api/SWGChatApi.h | 6 +- .../objc/SwaggerClient/Api/SWGChatApi.m | 2 +- .../objc/SwaggerClient/Api/SWGExecutionApi.h | 8 +- .../objc/SwaggerClient/Api/SWGExecutionApi.m | 8 +- .../objc/SwaggerClient/Api/SWGFundingApi.h | 5 +- .../objc/SwaggerClient/Api/SWGFundingApi.m | 2 +- .../Api/SWGGlobalNotificationApi.h | 43 + ...cationApi.m => SWGGlobalNotificationApi.m} | 28 +- .../objc/SwaggerClient/Api/SWGInstrumentApi.h | 16 +- .../objc/SwaggerClient/Api/SWGInstrumentApi.m | 12 +- .../objc/SwaggerClient/Api/SWGInsuranceApi.h | 5 +- .../objc/SwaggerClient/Api/SWGInsuranceApi.m | 2 +- .../SwaggerClient/Api/SWGLeaderboardApi.h | 10 +- .../SwaggerClient/Api/SWGLeaderboardApi.m | 12 +- .../SwaggerClient/Api/SWGLiquidationApi.h | 5 +- .../SwaggerClient/Api/SWGLiquidationApi.m | 2 +- .../SwaggerClient/Api/SWGNotificationApi.h | 42 - .../objc/SwaggerClient/Api/SWGOrderApi.h | 35 +- .../objc/SwaggerClient/Api/SWGOrderApi.m | 42 +- .../objc/SwaggerClient/Api/SWGOrderBookApi.h | 3 +- .../objc/SwaggerClient/Api/SWGPositionApi.h | 9 +- .../objc/SwaggerClient/Api/SWGPositionApi.m | 12 +- .../objc/SwaggerClient/Api/SWGQuoteApi.h | 10 +- .../objc/SwaggerClient/Api/SWGQuoteApi.m | 6 +- .../objc/SwaggerClient/Api/SWGSchemaApi.h | 4 +- .../objc/SwaggerClient/Api/SWGSettlementApi.h | 5 +- .../objc/SwaggerClient/Api/SWGSettlementApi.m | 2 +- .../objc/SwaggerClient/Api/SWGStatsApi.h | 5 +- .../objc/SwaggerClient/Api/SWGTradeApi.h | 10 +- .../objc/SwaggerClient/Api/SWGTradeApi.m | 6 +- .../objc/SwaggerClient/Api/SWGUserApi.h | 241 +- .../objc/SwaggerClient/Api/SWGUserApi.m | 473 ++- .../objc/SwaggerClient/Api/SWGUserEventApi.h | 46 + .../objc/SwaggerClient/Api/SWGUserEventApi.m | 118 + .../Core/JSONValueTransformer+ISO8601.h | 2 +- .../objc/SwaggerClient/Core/SWGApi.h | 2 +- .../objc/SwaggerClient/Core/SWGApiClient.h | 2 +- .../SwaggerClient/Core/SWGConfiguration.h | 2 +- .../Core/SWGDefaultConfiguration.h | 2 +- .../Core/SWGDefaultConfiguration.m | 14 +- .../Core/SWGJSONRequestSerializer.h | 2 +- .../objc/SwaggerClient/Core/SWGLogger.h | 2 +- .../objc/SwaggerClient/Core/SWGObject.h | 2 +- .../Core/SWGQueryParamCollection.h | 2 +- .../Core/SWGResponseDeserializer.h | 2 +- .../objc/SwaggerClient/Core/SWGSanitizer.h | 2 +- .../objc/SwaggerClient/Model/SWGAPIKey.h | 2 +- .../objc/SwaggerClient/Model/SWGAccessToken.h | 2 +- .../objc/SwaggerClient/Model/SWGAffiliate.h | 6 +- .../objc/SwaggerClient/Model/SWGAffiliate.m | 4 +- .../SwaggerClient/Model/SWGAnnouncement.h | 2 +- .../objc/SwaggerClient/Model/SWGChat.h | 2 +- .../objc/SwaggerClient/Model/SWGChatChannel.h | 2 +- .../Model/SWGCommunicationToken.h | 34 + ...erCommission.m => SWGCommunicationToken.m} | 8 +- .../SwaggerClient/Model/SWGConnectedUsers.h | 2 +- .../objc/SwaggerClient/Model/SWGError.h | 2 +- .../objc/SwaggerClient/Model/SWGErrorError.h | 2 +- .../objc/SwaggerClient/Model/SWGExecution.h | 2 +- .../objc/SwaggerClient/Model/SWGFunding.h | 2 +- .../Model/SWGGlobalNotification.h | 46 + ...Notification.m => SWGGlobalNotification.m} | 4 +- .../SwaggerClient/Model/SWGIndexComposite.h | 2 +- .../Model/SWGInlineResponse200.h | 4 +- .../Model/SWGInlineResponse200.m | 4 +- .../Model/SWGInlineResponse2001.h | 28 - .../objc/SwaggerClient/Model/SWGInstrument.h | 6 +- .../objc/SwaggerClient/Model/SWGInstrument.m | 4 +- .../Model/SWGInstrumentInterval.h | 2 +- .../objc/SwaggerClient/Model/SWGInsurance.h | 2 +- .../objc/SwaggerClient/Model/SWGLeaderboard.h | 2 +- .../objc/SwaggerClient/Model/SWGLiquidation.h | 2 +- .../objc/SwaggerClient/Model/SWGMargin.h | 2 +- .../SwaggerClient/Model/SWGNotification.h | 46 - .../objc/SwaggerClient/Model/SWGOrder.h | 2 +- .../objc/SwaggerClient/Model/SWGOrderBookL2.h | 2 +- .../objc/SwaggerClient/Model/SWGPosition.h | 2 +- .../objc/SwaggerClient/Model/SWGQuote.h | 2 +- .../SwaggerClient/Model/SWGQuoteFillRatio.h | 40 + .../SwaggerClient/Model/SWGQuoteFillRatio.m | 34 + .../objc/SwaggerClient/Model/SWGSettlement.h | 2 +- .../objc/SwaggerClient/Model/SWGStats.h | 2 +- .../SwaggerClient/Model/SWGStatsHistory.h | 2 +- .../objc/SwaggerClient/Model/SWGStatsUSD.h | 2 +- .../objc/SwaggerClient/Model/SWGTrade.h | 2 +- .../objc/SwaggerClient/Model/SWGTradeBin.h | 2 +- .../objc/SwaggerClient/Model/SWGTransaction.h | 2 +- .../objc/SwaggerClient/Model/SWGUser.h | 2 +- .../SwaggerClient/Model/SWGUserCommission.h | 34 - .../Model/SWGUserCommissionsBySymbol.h | 26 + ...nse2001.m => SWGUserCommissionsBySymbol.m} | 8 +- .../objc/SwaggerClient/Model/SWGUserEvent.h | 48 + .../objc/SwaggerClient/Model/SWGUserEvent.m | 34 + .../SwaggerClient/Model/SWGUserPreferences.h | 4 +- .../SwaggerClient/Model/SWGUserPreferences.m | 4 +- .../objc/SwaggerClient/Model/SWGWallet.h | 2 +- .../objc/SwaggerClient/Model/SWGXAny.h | 2 +- auto-generated/objc/docs/SWGAPIKeyApi.md | 296 +- auto-generated/objc/docs/SWGAffiliate.md | 2 + .../objc/docs/SWGAnnouncementApi.md | 14 +- auto-generated/objc/docs/SWGChatApi.md | 14 +- .../objc/docs/SWGCommunicationToken.md | 13 + auto-generated/objc/docs/SWGExecutionApi.md | 34 +- auto-generated/objc/docs/SWGFundingApi.md | 6 +- ...tification.md => SWGGlobalNotification.md} | 2 +- ...tionApi.md => SWGGlobalNotificationApi.md} | 38 +- .../objc/docs/SWGInlineResponse200.md | 2 +- auto-generated/objc/docs/SWGInstrument.md | 2 + auto-generated/objc/docs/SWGInstrumentApi.md | 16 +- auto-generated/objc/docs/SWGInsuranceApi.md | 6 +- auto-generated/objc/docs/SWGLeaderboardApi.md | 20 +- auto-generated/objc/docs/SWGLiquidationApi.md | 6 +- auto-generated/objc/docs/SWGOrderApi.md | 152 +- auto-generated/objc/docs/SWGOrderBookApi.md | 2 +- auto-generated/objc/docs/SWGPositionApi.md | 64 +- auto-generated/objc/docs/SWGQuoteApi.md | 12 +- auto-generated/objc/docs/SWGQuoteFillRatio.md | 16 + auto-generated/objc/docs/SWGSchemaApi.md | 2 +- auto-generated/objc/docs/SWGSettlementApi.md | 6 +- auto-generated/objc/docs/SWGStatsApi.md | 2 +- auto-generated/objc/docs/SWGTradeApi.md | 12 +- auto-generated/objc/docs/SWGUserApi.md | 638 ++-- .../docs/SWGUserCommissionsBySymbol.md} | 3 +- auto-generated/objc/docs/SWGUserEvent.md | 20 + auto-generated/objc/docs/SWGUserEventApi.md | 78 + .../objc/docs/SWGUserPreferences.md | 1 + auto-generated/php/.swagger-codegen/VERSION | 2 +- auto-generated/php/SwaggerClient-php/.php_cs | 33 +- .../php/SwaggerClient-php/README.md | 49 +- .../php/SwaggerClient-php/composer.json | 2 +- .../SwaggerClient-php/docs/Api/APIKeyApi.md | 270 +- .../docs/Api/AnnouncementApi.md | 12 +- .../php/SwaggerClient-php/docs/Api/ChatApi.md | 12 +- .../docs/Api/ExecutionApi.md | 30 +- .../SwaggerClient-php/docs/Api/FundingApi.md | 6 +- ...icationApi.md => GlobalNotificationApi.md} | 30 +- .../docs/Api/InstrumentApi.md | 14 +- .../docs/Api/InsuranceApi.md | 6 +- .../docs/Api/LeaderboardApi.md | 16 +- .../docs/Api/LiquidationApi.md | 6 +- .../SwaggerClient-php/docs/Api/OrderApi.md | 134 +- .../docs/Api/OrderBookApi.md | 2 +- .../SwaggerClient-php/docs/Api/PositionApi.md | 54 +- .../SwaggerClient-php/docs/Api/QuoteApi.md | 12 +- .../SwaggerClient-php/docs/Api/SchemaApi.md | 2 +- .../docs/Api/SettlementApi.md | 6 +- .../SwaggerClient-php/docs/Api/StatsApi.md | 2 +- .../SwaggerClient-php/docs/Api/TradeApi.md | 12 +- .../php/SwaggerClient-php/docs/Api/UserApi.md | 510 ++-- .../docs/Api/UserEventApi.md | 72 + .../SwaggerClient-php/docs/Model/Affiliate.md | 2 + .../docs/Model/CommunicationToken.md | 13 + ...{Notification.md => GlobalNotification.md} | 2 +- .../docs/Model/InlineResponse200.md | 2 +- .../docs/Model/Instrument.md | 2 + .../docs/Model/QuoteFillRatio.md | 16 + .../docs/Model/UserCommission.md | 13 - .../docs/Model/UserCommissionsBySymbol.md} | 3 +- .../SwaggerClient-php/docs/Model/UserEvent.md | 20 + .../docs/Model/UserPreferences.md | 1 + .../SwaggerClient-php/lib/Api/APIKeyApi.php | 1317 +-------- .../lib/Api/AnnouncementApi.php | 54 +- .../php/SwaggerClient-php/lib/Api/ChatApi.php | 96 +- .../lib/Api/ExecutionApi.php | 82 +- .../SwaggerClient-php/lib/Api/FundingApi.php | 35 +- ...ationApi.php => GlobalNotificationApi.php} | 87 +- .../lib/Api/InstrumentApi.php | 167 +- .../lib/Api/InsuranceApi.php | 35 +- .../lib/Api/LeaderboardApi.php | 64 +- .../lib/Api/LiquidationApi.php | 35 +- .../SwaggerClient-php/lib/Api/OrderApi.php | 355 ++- .../lib/Api/OrderBookApi.php | 25 +- .../SwaggerClient-php/lib/Api/PositionApi.php | 149 +- .../SwaggerClient-php/lib/Api/QuoteApi.php | 66 +- .../SwaggerClient-php/lib/Api/SchemaApi.php | 46 +- .../lib/Api/SettlementApi.php | 35 +- .../SwaggerClient-php/lib/Api/StatsApi.php | 67 +- .../SwaggerClient-php/lib/Api/TradeApi.php | 66 +- .../php/SwaggerClient-php/lib/Api/UserApi.php | 2621 +++++++++-------- .../lib/Api/UserEventApi.php | 423 +++ .../SwaggerClient-php/lib/ApiException.php | 4 +- .../SwaggerClient-php/lib/Configuration.php | 6 +- .../SwaggerClient-php/lib/HeaderSelector.php | 5 +- .../SwaggerClient-php/lib/Model/APIKey.php | 4 +- .../lib/Model/AccessToken.php | 4 +- .../SwaggerClient-php/lib/Model/Affiliate.php | 74 +- .../lib/Model/Announcement.php | 4 +- .../php/SwaggerClient-php/lib/Model/Chat.php | 4 +- .../lib/Model/ChatChannel.php | 4 +- ...rCommission.php => CommunicationToken.php} | 137 +- .../lib/Model/ConnectedUsers.php | 4 +- .../php/SwaggerClient-php/lib/Model/Error.php | 4 +- .../lib/Model/ErrorError.php | 4 +- .../SwaggerClient-php/lib/Model/Execution.php | 4 +- .../SwaggerClient-php/lib/Model/Funding.php | 4 +- ...otification.php => GlobalNotification.php} | 12 +- .../lib/Model/IndexComposite.php | 4 +- .../lib/Model/InlineResponse200.php | 32 +- .../lib/Model/Instrument.php | 64 +- .../lib/Model/InstrumentInterval.php | 4 +- .../SwaggerClient-php/lib/Model/Insurance.php | 4 +- .../lib/Model/Leaderboard.php | 4 +- .../lib/Model/Liquidation.php | 4 +- .../SwaggerClient-php/lib/Model/Margin.php | 4 +- .../lib/Model/ModelInterface.php | 4 +- .../php/SwaggerClient-php/lib/Model/Order.php | 4 +- .../lib/Model/OrderBookL2.php | 4 +- .../SwaggerClient-php/lib/Model/Position.php | 4 +- .../php/SwaggerClient-php/lib/Model/Quote.php | 4 +- .../lib/Model/QuoteFillRatio.php | 485 +++ .../lib/Model/Settlement.php | 4 +- .../php/SwaggerClient-php/lib/Model/Stats.php | 4 +- .../lib/Model/StatsHistory.php | 4 +- .../SwaggerClient-php/lib/Model/StatsUSD.php | 4 +- .../php/SwaggerClient-php/lib/Model/Trade.php | 4 +- .../SwaggerClient-php/lib/Model/TradeBin.php | 4 +- .../lib/Model/Transaction.php | 4 +- .../php/SwaggerClient-php/lib/Model/User.php | 4 +- ...se2001.php => UserCommissionsBySymbol.php} | 47 +- .../SwaggerClient-php/lib/Model/UserEvent.php | 751 +++++ .../lib/Model/UserPreferences.php | 34 +- .../SwaggerClient-php/lib/Model/Wallet.php | 4 +- .../php/SwaggerClient-php/lib/Model/XAny.php | 4 +- .../lib/ObjectSerializer.php | 13 +- .../test/Api/APIKeyApiTest.php | 44 +- .../test/Api/AnnouncementApiTest.php | 4 +- .../test/Api/ChatApiTest.php | 4 +- .../test/Api/ExecutionApiTest.php | 4 +- .../test/Api/FundingApiTest.php | 4 +- .../test/Api/GlobalNotificationApiTest.php | 83 + .../test/Api/InstrumentApiTest.php | 4 +- .../test/Api/InsuranceApiTest.php | 4 +- .../test/Api/LeaderboardApiTest.php | 4 +- .../test/Api/LiquidationApiTest.php | 4 +- .../test/Api/NotificationApiTest.php | 83 - .../test/Api/OrderApiTest.php | 4 +- .../test/Api/OrderBookApiTest.php | 4 +- .../test/Api/PositionApiTest.php | 4 +- .../test/Api/QuoteApiTest.php | 4 +- .../test/Api/SchemaApiTest.php | 4 +- .../test/Api/SettlementApiTest.php | 4 +- .../test/Api/StatsApiTest.php | 4 +- .../test/Api/TradeApiTest.php | 4 +- .../test/Api/UserApiTest.php | 76 +- .../test/Api/UserEventApiTest.php | 83 + .../test/Model/APIKeyTest.php | 4 +- .../test/Model/AccessTokenTest.php | 4 +- .../test/Model/AffiliateTest.php | 18 +- .../test/Model/AnnouncementTest.php | 4 +- .../test/Model/ChatChannelTest.php | 4 +- .../SwaggerClient-php/test/Model/ChatTest.php | 4 +- .../test/Model/CommunicationTokenTest.php | 106 + .../test/Model/ConnectedUsersTest.php | 4 +- .../test/Model/ErrorErrorTest.php | 4 +- .../test/Model/ErrorTest.php | 4 +- .../test/Model/ExecutionTest.php | 4 +- .../test/Model/FundingTest.php | 4 +- ...ionTest.php => GlobalNotificationTest.php} | 14 +- .../test/Model/IndexCompositeTest.php | 4 +- .../test/Model/InlineResponse2001Test.php | 85 - .../test/Model/InlineResponse200Test.php | 8 +- .../test/Model/InstrumentIntervalTest.php | 4 +- .../test/Model/InstrumentTest.php | 18 +- .../test/Model/InsuranceTest.php | 4 +- .../test/Model/LeaderboardTest.php | 4 +- .../test/Model/LiquidationTest.php | 4 +- .../test/Model/MarginTest.php | 4 +- .../test/Model/OrderBookL2Test.php | 4 +- .../test/Model/OrderTest.php | 4 +- .../test/Model/PositionTest.php | 4 +- .../test/Model/QuoteFillRatioTest.php | 127 + .../test/Model/QuoteTest.php | 4 +- .../test/Model/SettlementTest.php | 4 +- .../test/Model/StatsHistoryTest.php | 4 +- .../test/Model/StatsTest.php | 4 +- .../test/Model/StatsUSDTest.php | 4 +- .../test/Model/TradeBinTest.php | 4 +- .../test/Model/TradeTest.php | 4 +- .../test/Model/TransactionTest.php | 4 +- .../test/Model/UserCommissionTest.php | 106 - .../Model/UserCommissionsBySymbolTest.php | 78 + .../test/Model/UserEventTest.php | 155 + .../test/Model/UserPreferencesTest.php | 11 +- .../SwaggerClient-php/test/Model/UserTest.php | 4 +- .../test/Model/WalletTest.php | 4 +- .../SwaggerClient-php/test/Model/XAnyTest.php | 4 +- .../python/.swagger-codegen/VERSION | 2 +- auto-generated/python/README.md | 53 +- auto-generated/python/docs/APIKeyApi.md | 276 +- auto-generated/python/docs/Affiliate.md | 2 + auto-generated/python/docs/AnnouncementApi.md | 14 +- auto-generated/python/docs/ChatApi.md | 14 +- .../python/docs/CommunicationToken.md | 13 + auto-generated/python/docs/ExecutionApi.md | 34 +- auto-generated/python/docs/FundingApi.md | 6 +- ...{Notification.md => GlobalNotification.md} | 2 +- ...icationApi.md => GlobalNotificationApi.md} | 34 +- .../python/docs/InlineResponse200.md | 2 +- auto-generated/python/docs/Instrument.md | 2 + auto-generated/python/docs/InstrumentApi.md | 14 +- auto-generated/python/docs/InsuranceApi.md | 6 +- auto-generated/python/docs/LeaderboardApi.md | 18 +- auto-generated/python/docs/LiquidationApi.md | 6 +- auto-generated/python/docs/OrderApi.md | 152 +- auto-generated/python/docs/OrderBookApi.md | 2 +- auto-generated/python/docs/PositionApi.md | 64 +- auto-generated/python/docs/QuoteApi.md | 12 +- auto-generated/python/docs/QuoteFillRatio.md | 16 + auto-generated/python/docs/SchemaApi.md | 2 +- auto-generated/python/docs/SettlementApi.md | 6 +- auto-generated/python/docs/StatsApi.md | 2 +- auto-generated/python/docs/TradeApi.md | 12 +- auto-generated/python/docs/UserApi.md | 562 ++-- auto-generated/python/docs/UserCommission.md | 13 - .../docs/UserCommissionsBySymbol.md} | 3 +- auto-generated/python/docs/UserEvent.md | 20 + auto-generated/python/docs/UserEventApi.md | 73 + auto-generated/python/docs/UserPreferences.md | 1 + auto-generated/python/setup.py | 12 +- .../python/swagger_client/__init__.py | 13 +- .../python/swagger_client/api/__init__.py | 3 +- .../swagger_client/api/announcement_api.py | 40 +- .../python/swagger_client/api/api_key_api.py | 424 +-- .../python/swagger_client/api/chat_api.py | 76 +- .../swagger_client/api/execution_api.py | 50 +- .../python/swagger_client/api/funding_api.py | 24 +- ...tion_api.py => global_notification_api.py} | 46 +- .../swagger_client/api/instrument_api.py | 128 +- .../swagger_client/api/insurance_api.py | 24 +- .../swagger_client/api/leaderboard_api.py | 46 +- .../swagger_client/api/liquidation_api.py | 24 +- .../python/swagger_client/api/order_api.py | 234 +- .../swagger_client/api/order_book_api.py | 20 +- .../python/swagger_client/api/position_api.py | 106 +- .../python/swagger_client/api/quote_api.py | 48 +- .../python/swagger_client/api/schema_api.py | 42 +- .../swagger_client/api/settlement_api.py | 24 +- .../python/swagger_client/api/stats_api.py | 56 +- .../python/swagger_client/api/trade_api.py | 48 +- .../python/swagger_client/api/user_api.py | 934 +++--- .../swagger_client/api/user_event_api.py | 131 + .../python/swagger_client/api_client.py | 47 +- .../python/swagger_client/configuration.py | 43 +- .../python/swagger_client/models/__init__.py | 10 +- .../swagger_client/models/access_token.py | 5 +- .../python/swagger_client/models/affiliate.py | 63 +- .../swagger_client/models/announcement.py | 5 +- .../python/swagger_client/models/api_key.py | 7 +- .../python/swagger_client/models/chat.py | 5 +- .../swagger_client/models/chat_channel.py | 5 +- .../models/communication_token.py | 197 ++ .../swagger_client/models/connected_users.py | 5 +- .../python/swagger_client/models/error.py | 7 +- .../swagger_client/models/error_error.py | 5 +- .../python/swagger_client/models/execution.py | 5 +- .../python/swagger_client/models/funding.py | 5 +- ...notification.py => global_notification.py} | 91 +- .../swagger_client/models/index_composite.py | 5 +- .../models/inline_response200.py | 39 +- .../models/inline_response2001.py | 112 - .../swagger_client/models/instrument.py | 59 +- .../models/instrument_interval.py | 5 +- .../python/swagger_client/models/insurance.py | 5 +- .../swagger_client/models/leaderboard.py | 5 +- .../swagger_client/models/liquidation.py | 5 +- .../python/swagger_client/models/margin.py | 5 +- .../python/swagger_client/models/order.py | 5 +- .../swagger_client/models/order_book_l2.py | 5 +- .../python/swagger_client/models/position.py | 5 +- .../python/swagger_client/models/quote.py | 5 +- .../swagger_client/models/quote_fill_ratio.py | 272 ++ .../swagger_client/models/settlement.py | 5 +- .../python/swagger_client/models/stats.py | 5 +- .../swagger_client/models/stats_history.py | 5 +- .../python/swagger_client/models/stats_usd.py | 5 +- .../python/swagger_client/models/trade.py | 5 +- .../python/swagger_client/models/trade_bin.py | 5 +- .../swagger_client/models/transaction.py | 5 +- .../python/swagger_client/models/user.py | 7 +- .../swagger_client/models/user_commission.py | 190 -- .../models/user_commissions_by_symbol.py | 87 + .../swagger_client/models/user_event.py | 398 +++ .../swagger_client/models/user_preferences.py | 33 +- .../python/swagger_client/models/wallet.py | 5 +- .../python/swagger_client/models/x_any.py | 5 +- auto-generated/python/swagger_client/rest.py | 2 +- .../python/test/test_access_token.py | 2 +- auto-generated/python/test/test_affiliate.py | 2 +- .../python/test/test_announcement.py | 2 +- .../python/test/test_announcement_api.py | 2 +- auto-generated/python/test/test_api_key.py | 2 +- .../python/test/test_api_key_api.py | 30 +- auto-generated/python/test/test_chat.py | 2 +- auto-generated/python/test/test_chat_api.py | 2 +- .../python/test/test_chat_channel.py | 2 +- .../python/test/test_communication_token.py | 40 + .../python/test/test_connected_users.py | 2 +- auto-generated/python/test/test_error.py | 2 +- .../python/test/test_error_error.py | 2 +- auto-generated/python/test/test_execution.py | 2 +- .../python/test/test_execution_api.py | 2 +- auto-generated/python/test/test_funding.py | 2 +- .../python/test/test_funding_api.py | 2 +- .../python/test/test_global_notification.py | 40 + .../test/test_global_notification_api.py | 41 + .../python/test/test_index_composite.py | 2 +- .../python/test/test_inline_response200.py | 2 +- .../python/test/test_inline_response2001.py | 40 - auto-generated/python/test/test_instrument.py | 2 +- .../python/test/test_instrument_api.py | 2 +- .../python/test/test_instrument_interval.py | 2 +- auto-generated/python/test/test_insurance.py | 2 +- .../python/test/test_insurance_api.py | 2 +- .../python/test/test_leaderboard.py | 2 +- .../python/test/test_leaderboard_api.py | 2 +- .../python/test/test_liquidation.py | 2 +- .../python/test/test_liquidation_api.py | 2 +- auto-generated/python/test/test_margin.py | 2 +- .../python/test/test_notification.py | 40 - .../python/test/test_notification_api.py | 41 - auto-generated/python/test/test_order.py | 2 +- auto-generated/python/test/test_order_api.py | 2 +- .../python/test/test_order_book_api.py | 2 +- .../python/test/test_order_book_l2.py | 2 +- auto-generated/python/test/test_position.py | 2 +- .../python/test/test_position_api.py | 2 +- auto-generated/python/test/test_quote.py | 2 +- auto-generated/python/test/test_quote_api.py | 2 +- .../python/test/test_quote_fill_ratio.py | 40 + auto-generated/python/test/test_schema_api.py | 2 +- auto-generated/python/test/test_settlement.py | 2 +- .../python/test/test_settlement_api.py | 2 +- auto-generated/python/test/test_stats.py | 2 +- auto-generated/python/test/test_stats_api.py | 2 +- .../python/test/test_stats_history.py | 2 +- auto-generated/python/test/test_stats_usd.py | 2 +- auto-generated/python/test/test_trade.py | 2 +- auto-generated/python/test/test_trade_api.py | 2 +- auto-generated/python/test/test_trade_bin.py | 2 +- .../python/test/test_transaction.py | 2 +- auto-generated/python/test/test_user.py | 2 +- auto-generated/python/test/test_user_api.py | 56 +- .../python/test/test_user_commission.py | 40 - .../test/test_user_commissions_by_symbol.py | 40 + auto-generated/python/test/test_user_event.py | 40 + .../python/test/test_user_event_api.py | 41 + .../python/test/test_user_preferences.py | 2 +- auto-generated/python/test/test_wallet.py | 2 +- auto-generated/python/test/test_x_any.py | 2 +- .../qt5cpp/.swagger-codegen/VERSION | 2 +- auto-generated/qt5cpp/client/SWGAPIKey.cpp | 2 +- auto-generated/qt5cpp/client/SWGAPIKey.h | 2 +- auto-generated/qt5cpp/client/SWGAPIKeyApi.cpp | 238 +- auto-generated/qt5cpp/client/SWGAPIKeyApi.h | 24 +- .../qt5cpp/client/SWGAccessToken.cpp | 2 +- auto-generated/qt5cpp/client/SWGAccessToken.h | 2 +- auto-generated/qt5cpp/client/SWGAffiliate.cpp | 40 +- auto-generated/qt5cpp/client/SWGAffiliate.h | 14 +- .../qt5cpp/client/SWGAnnouncement.cpp | 2 +- .../qt5cpp/client/SWGAnnouncement.h | 2 +- .../qt5cpp/client/SWGAnnouncementApi.cpp | 2 +- .../qt5cpp/client/SWGAnnouncementApi.h | 2 +- auto-generated/qt5cpp/client/SWGChat.cpp | 2 +- auto-generated/qt5cpp/client/SWGChat.h | 2 +- auto-generated/qt5cpp/client/SWGChatApi.cpp | 2 +- auto-generated/qt5cpp/client/SWGChatApi.h | 2 +- .../qt5cpp/client/SWGChatChannel.cpp | 2 +- auto-generated/qt5cpp/client/SWGChatChannel.h | 2 +- .../qt5cpp/client/SWGCommunicationToken.cpp | 168 ++ .../qt5cpp/client/SWGCommunicationToken.h | 77 + .../qt5cpp/client/SWGConnectedUsers.cpp | 2 +- .../qt5cpp/client/SWGConnectedUsers.h | 2 +- auto-generated/qt5cpp/client/SWGError.cpp | 2 +- auto-generated/qt5cpp/client/SWGError.h | 2 +- .../qt5cpp/client/SWGError_error.cpp | 2 +- auto-generated/qt5cpp/client/SWGError_error.h | 2 +- auto-generated/qt5cpp/client/SWGExecution.cpp | 2 +- auto-generated/qt5cpp/client/SWGExecution.h | 2 +- .../qt5cpp/client/SWGExecutionApi.cpp | 2 +- .../qt5cpp/client/SWGExecutionApi.h | 2 +- auto-generated/qt5cpp/client/SWGFunding.cpp | 2 +- auto-generated/qt5cpp/client/SWGFunding.h | 2 +- .../qt5cpp/client/SWGFundingApi.cpp | 2 +- auto-generated/qt5cpp/client/SWGFundingApi.h | 2 +- ...fication.cpp => SWGGlobalNotification.cpp} | 66 +- ...Notification.h => SWGGlobalNotification.h} | 20 +- .../client/SWGGlobalNotificationApi.cpp | 98 + .../qt5cpp/client/SWGGlobalNotificationApi.h | 52 + auto-generated/qt5cpp/client/SWGHelpers.cpp | 2 +- auto-generated/qt5cpp/client/SWGHelpers.h | 2 +- .../qt5cpp/client/SWGHttpRequest.cpp | 2 +- auto-generated/qt5cpp/client/SWGHttpRequest.h | 2 +- .../qt5cpp/client/SWGIndexComposite.cpp | 2 +- .../qt5cpp/client/SWGIndexComposite.h | 2 +- .../qt5cpp/client/SWGInline_response_200.cpp | 30 +- .../qt5cpp/client/SWGInline_response_200.h | 11 +- .../client/SWGInline_response_200_1.cpp | 105 - .../qt5cpp/client/SWGInline_response_200_1.h | 58 - .../qt5cpp/client/SWGInstrument.cpp | 40 +- auto-generated/qt5cpp/client/SWGInstrument.h | 14 +- .../qt5cpp/client/SWGInstrumentApi.cpp | 12 +- .../qt5cpp/client/SWGInstrumentApi.h | 4 +- .../qt5cpp/client/SWGInstrumentInterval.cpp | 2 +- .../qt5cpp/client/SWGInstrumentInterval.h | 2 +- auto-generated/qt5cpp/client/SWGInsurance.cpp | 2 +- auto-generated/qt5cpp/client/SWGInsurance.h | 2 +- .../qt5cpp/client/SWGInsuranceApi.cpp | 2 +- .../qt5cpp/client/SWGInsuranceApi.h | 2 +- .../qt5cpp/client/SWGLeaderboard.cpp | 2 +- auto-generated/qt5cpp/client/SWGLeaderboard.h | 2 +- .../qt5cpp/client/SWGLeaderboardApi.cpp | 6 +- .../qt5cpp/client/SWGLeaderboardApi.h | 8 +- .../qt5cpp/client/SWGLiquidation.cpp | 2 +- auto-generated/qt5cpp/client/SWGLiquidation.h | 2 +- .../qt5cpp/client/SWGLiquidationApi.cpp | 2 +- .../qt5cpp/client/SWGLiquidationApi.h | 2 +- auto-generated/qt5cpp/client/SWGMargin.cpp | 2 +- auto-generated/qt5cpp/client/SWGMargin.h | 2 +- .../qt5cpp/client/SWGModelFactory.h | 32 +- .../qt5cpp/client/SWGNotificationApi.cpp | 98 - .../qt5cpp/client/SWGNotificationApi.h | 52 - auto-generated/qt5cpp/client/SWGObject.h | 2 +- auto-generated/qt5cpp/client/SWGOrder.cpp | 2 +- auto-generated/qt5cpp/client/SWGOrder.h | 2 +- auto-generated/qt5cpp/client/SWGOrderApi.cpp | 2 +- auto-generated/qt5cpp/client/SWGOrderApi.h | 2 +- .../qt5cpp/client/SWGOrderBookApi.cpp | 2 +- .../qt5cpp/client/SWGOrderBookApi.h | 2 +- .../qt5cpp/client/SWGOrderBookL2.cpp | 2 +- auto-generated/qt5cpp/client/SWGOrderBookL2.h | 2 +- auto-generated/qt5cpp/client/SWGPosition.cpp | 2 +- auto-generated/qt5cpp/client/SWGPosition.h | 2 +- .../qt5cpp/client/SWGPositionApi.cpp | 2 +- auto-generated/qt5cpp/client/SWGPositionApi.h | 2 +- .../qt5cpp/client/SWGQObjectWrapper.h | 2 +- auto-generated/qt5cpp/client/SWGQuote.cpp | 2 +- auto-generated/qt5cpp/client/SWGQuote.h | 2 +- auto-generated/qt5cpp/client/SWGQuoteApi.cpp | 2 +- auto-generated/qt5cpp/client/SWGQuoteApi.h | 2 +- .../qt5cpp/client/SWGQuoteFillRatio.cpp | 219 ++ .../qt5cpp/client/SWGQuoteFillRatio.h | 94 + auto-generated/qt5cpp/client/SWGSchemaApi.cpp | 2 +- auto-generated/qt5cpp/client/SWGSchemaApi.h | 2 +- .../qt5cpp/client/SWGSettlement.cpp | 2 +- auto-generated/qt5cpp/client/SWGSettlement.h | 2 +- .../qt5cpp/client/SWGSettlementApi.cpp | 2 +- .../qt5cpp/client/SWGSettlementApi.h | 2 +- auto-generated/qt5cpp/client/SWGStats.cpp | 2 +- auto-generated/qt5cpp/client/SWGStats.h | 2 +- auto-generated/qt5cpp/client/SWGStatsApi.cpp | 2 +- auto-generated/qt5cpp/client/SWGStatsApi.h | 2 +- .../qt5cpp/client/SWGStatsHistory.cpp | 2 +- .../qt5cpp/client/SWGStatsHistory.h | 2 +- auto-generated/qt5cpp/client/SWGStatsUSD.cpp | 2 +- auto-generated/qt5cpp/client/SWGStatsUSD.h | 2 +- auto-generated/qt5cpp/client/SWGTrade.cpp | 2 +- auto-generated/qt5cpp/client/SWGTrade.h | 2 +- auto-generated/qt5cpp/client/SWGTradeApi.cpp | 2 +- auto-generated/qt5cpp/client/SWGTradeApi.h | 2 +- auto-generated/qt5cpp/client/SWGTradeBin.cpp | 2 +- auto-generated/qt5cpp/client/SWGTradeBin.h | 2 +- .../qt5cpp/client/SWGTransaction.cpp | 2 +- auto-generated/qt5cpp/client/SWGTransaction.h | 2 +- auto-generated/qt5cpp/client/SWGUser.cpp | 2 +- auto-generated/qt5cpp/client/SWGUser.h | 2 +- auto-generated/qt5cpp/client/SWGUserApi.cpp | 460 ++- auto-generated/qt5cpp/client/SWGUserApi.h | 56 +- .../qt5cpp/client/SWGUserCommission.cpp | 160 - .../qt5cpp/client/SWGUserCommission.h | 75 - .../client/SWGUserCommissionsBySymbol.cpp | 84 + .../client/SWGUserCommissionsBySymbol.h | 51 + auto-generated/qt5cpp/client/SWGUserEvent.cpp | 309 ++ auto-generated/qt5cpp/client/SWGUserEvent.h | 120 + .../qt5cpp/client/SWGUserEventApi.cpp | 114 + .../qt5cpp/client/SWGUserEventApi.h | 52 + .../qt5cpp/client/SWGUserPreferences.cpp | 27 +- .../qt5cpp/client/SWGUserPreferences.h | 8 +- auto-generated/qt5cpp/client/SWGWallet.cpp | 2 +- auto-generated/qt5cpp/client/SWGWallet.h | 2 +- auto-generated/qt5cpp/client/SWGX-any.cpp | 2 +- auto-generated/qt5cpp/client/SWGX-any.h | 2 +- auto-generated/qt5cpp/client/client.pri | 22 +- auto-generated/ruby/.swagger-codegen/VERSION | 2 +- auto-generated/ruby/README.md | 56 +- auto-generated/ruby/docs/APIKeyApi.md | 277 +- auto-generated/ruby/docs/Affiliate.md | 2 + auto-generated/ruby/docs/AnnouncementApi.md | 14 +- auto-generated/ruby/docs/ChatApi.md | 14 +- .../ruby/docs/CommunicationToken.md | 11 + auto-generated/ruby/docs/ExecutionApi.md | 34 +- auto-generated/ruby/docs/FundingApi.md | 6 +- ...{Notification.md => GlobalNotification.md} | 2 +- ...icationApi.md => GlobalNotificationApi.md} | 34 +- auto-generated/ruby/docs/InlineResponse200.md | 2 +- auto-generated/ruby/docs/Instrument.md | 2 + auto-generated/ruby/docs/InstrumentApi.md | 10 +- auto-generated/ruby/docs/InsuranceApi.md | 6 +- auto-generated/ruby/docs/LeaderboardApi.md | 18 +- auto-generated/ruby/docs/LiquidationApi.md | 6 +- auto-generated/ruby/docs/OrderApi.md | 152 +- auto-generated/ruby/docs/OrderBookApi.md | 2 +- auto-generated/ruby/docs/PositionApi.md | 64 +- auto-generated/ruby/docs/QuoteApi.md | 12 +- auto-generated/ruby/docs/QuoteFillRatio.md | 14 + auto-generated/ruby/docs/SchemaApi.md | 2 +- auto-generated/ruby/docs/SettlementApi.md | 6 +- auto-generated/ruby/docs/StatsApi.md | 2 +- auto-generated/ruby/docs/TradeApi.md | 12 +- auto-generated/ruby/docs/UserApi.md | 578 ++-- auto-generated/ruby/docs/UserCommission.md | 11 - ...onse2001.md => UserCommissionsBySymbol.md} | 3 +- auto-generated/ruby/docs/UserEvent.md | 18 + auto-generated/ruby/docs/UserEventApi.md | 74 + auto-generated/ruby/docs/UserPreferences.md | 1 + auto-generated/ruby/lib/swagger_client.rb | 15 +- .../swagger_client/api/announcement_api.rb | 6 +- .../lib/swagger_client/api/api_key_api.rb | 228 +- .../ruby/lib/swagger_client/api/chat_api.rb | 6 +- .../lib/swagger_client/api/execution_api.rb | 16 +- .../lib/swagger_client/api/funding_api.rb | 8 +- .../api/global_notification_api.rb | 71 + .../lib/swagger_client/api/instrument_api.rb | 15 +- .../lib/swagger_client/api/insurance_api.rb | 8 +- .../lib/swagger_client/api/leaderboard_api.rb | 12 +- .../lib/swagger_client/api/liquidation_api.rb | 8 +- .../swagger_client/api/notification_api.rb | 71 - .../ruby/lib/swagger_client/api/order_api.rb | 70 +- .../lib/swagger_client/api/order_book_api.rb | 4 +- .../lib/swagger_client/api/position_api.rb | 18 +- .../ruby/lib/swagger_client/api/quote_api.rb | 14 +- .../ruby/lib/swagger_client/api/schema_api.rb | 4 +- .../lib/swagger_client/api/settlement_api.rb | 8 +- .../ruby/lib/swagger_client/api/stats_api.rb | 4 +- .../ruby/lib/swagger_client/api/trade_api.rb | 14 +- .../ruby/lib/swagger_client/api/user_api.rb | 442 ++- .../lib/swagger_client/api/user_event_api.rb | 75 + .../ruby/lib/swagger_client/api_client.rb | 4 +- .../ruby/lib/swagger_client/api_error.rb | 4 +- .../ruby/lib/swagger_client/configuration.rb | 18 +- .../lib/swagger_client/models/access_token.rb | 4 +- .../lib/swagger_client/models/affiliate.rb | 30 +- .../lib/swagger_client/models/announcement.rb | 4 +- .../ruby/lib/swagger_client/models/api_key.rb | 4 +- .../ruby/lib/swagger_client/models/chat.rb | 4 +- .../lib/swagger_client/models/chat_channel.rb | 4 +- ...r_commission.rb => communication_token.rb} | 77 +- .../swagger_client/models/connected_users.rb | 4 +- .../ruby/lib/swagger_client/models/error.rb | 4 +- .../lib/swagger_client/models/error_error.rb | 4 +- .../lib/swagger_client/models/execution.rb | 4 +- .../ruby/lib/swagger_client/models/funding.rb | 4 +- ...notification.rb => global_notification.rb} | 6 +- .../swagger_client/models/index_composite.rb | 4 +- .../models/inline_response_200.rb | 18 +- .../lib/swagger_client/models/instrument.rb | 24 +- .../models/instrument_interval.rb | 4 +- .../lib/swagger_client/models/insurance.rb | 4 +- .../lib/swagger_client/models/leaderboard.rb | 4 +- .../lib/swagger_client/models/liquidation.rb | 4 +- .../ruby/lib/swagger_client/models/margin.rb | 4 +- .../ruby/lib/swagger_client/models/order.rb | 4 +- .../swagger_client/models/order_book_l2.rb | 4 +- .../lib/swagger_client/models/position.rb | 4 +- .../ruby/lib/swagger_client/models/quote.rb | 4 +- .../swagger_client/models/quote_fill_ratio.rb | 243 ++ .../lib/swagger_client/models/settlement.rb | 4 +- .../ruby/lib/swagger_client/models/stats.rb | 4 +- .../swagger_client/models/stats_history.rb | 4 +- .../lib/swagger_client/models/stats_usd.rb | 4 +- .../ruby/lib/swagger_client/models/trade.rb | 4 +- .../lib/swagger_client/models/trade_bin.rb | 4 +- .../lib/swagger_client/models/transaction.rb | 4 +- .../ruby/lib/swagger_client/models/user.rb | 4 +- ...200_1.rb => user_commissions_by_symbol.rb} | 19 +- .../lib/swagger_client/models/user_event.rb | 390 +++ .../swagger_client/models/user_preferences.rb | 17 +- .../ruby/lib/swagger_client/models/wallet.rb | 4 +- .../ruby/lib/swagger_client/models/x_any.rb | 4 +- .../ruby/lib/swagger_client/version.rb | 4 +- .../ruby/spec/api/announcement_api_spec.rb | 4 +- .../ruby/spec/api/api_key_api_spec.rb | 53 +- auto-generated/ruby/spec/api/chat_api_spec.rb | 4 +- .../ruby/spec/api/execution_api_spec.rb | 8 +- .../ruby/spec/api/funding_api_spec.rb | 6 +- .../spec/api/global_notification_api_spec.rb | 46 + .../ruby/spec/api/instrument_api_spec.rb | 9 +- .../ruby/spec/api/insurance_api_spec.rb | 6 +- .../ruby/spec/api/leaderboard_api_spec.rb | 6 +- .../ruby/spec/api/liquidation_api_spec.rb | 6 +- .../ruby/spec/api/notification_api_spec.rb | 46 - .../ruby/spec/api/order_api_spec.rb | 28 +- .../ruby/spec/api/order_book_api_spec.rb | 4 +- .../ruby/spec/api/position_api_spec.rb | 6 +- .../ruby/spec/api/quote_api_spec.rb | 9 +- .../ruby/spec/api/schema_api_spec.rb | 4 +- .../ruby/spec/api/settlement_api_spec.rb | 6 +- .../ruby/spec/api/stats_api_spec.rb | 4 +- .../ruby/spec/api/trade_api_spec.rb | 9 +- auto-generated/ruby/spec/api/user_api_spec.rb | 107 +- .../ruby/spec/api/user_event_api_spec.rb | 47 + auto-generated/ruby/spec/api_client_spec.rb | 4 +- .../ruby/spec/configuration_spec.rb | 10 +- .../ruby/spec/models/access_token_spec.rb | 4 +- .../ruby/spec/models/affiliate_spec.rb | 16 +- .../ruby/spec/models/announcement_spec.rb | 4 +- .../ruby/spec/models/api_key_spec.rb | 4 +- .../ruby/spec/models/chat_channel_spec.rb | 4 +- auto-generated/ruby/spec/models/chat_spec.rb | 4 +- .../spec/models/communication_token_spec.rb | 59 + .../ruby/spec/models/connected_users_spec.rb | 4 +- .../ruby/spec/models/error_error_spec.rb | 4 +- auto-generated/ruby/spec/models/error_spec.rb | 4 +- .../ruby/spec/models/execution_spec.rb | 4 +- .../ruby/spec/models/funding_spec.rb | 4 +- ...on_spec.rb => global_notification_spec.rb} | 16 +- .../ruby/spec/models/index_composite_spec.rb | 4 +- .../spec/models/inline_response_200_1_spec.rb | 41 - .../spec/models/inline_response_200_spec.rb | 6 +- .../spec/models/instrument_interval_spec.rb | 4 +- .../ruby/spec/models/instrument_spec.rb | 16 +- .../ruby/spec/models/insurance_spec.rb | 4 +- .../ruby/spec/models/leaderboard_spec.rb | 4 +- .../ruby/spec/models/liquidation_spec.rb | 4 +- .../ruby/spec/models/margin_spec.rb | 4 +- .../ruby/spec/models/order_book_l2_spec.rb | 4 +- auto-generated/ruby/spec/models/order_spec.rb | 4 +- .../ruby/spec/models/position_spec.rb | 4 +- .../ruby/spec/models/quote_fill_ratio_spec.rb | 77 + auto-generated/ruby/spec/models/quote_spec.rb | 4 +- .../ruby/spec/models/settlement_spec.rb | 4 +- .../ruby/spec/models/stats_history_spec.rb | 4 +- auto-generated/ruby/spec/models/stats_spec.rb | 4 +- .../ruby/spec/models/stats_usd_spec.rb | 4 +- .../ruby/spec/models/trade_bin_spec.rb | 4 +- auto-generated/ruby/spec/models/trade_spec.rb | 4 +- .../ruby/spec/models/transaction_spec.rb | 4 +- .../ruby/spec/models/user_commission_spec.rb | 59 - .../models/user_commissions_by_symbol_spec.rb | 35 + .../ruby/spec/models/user_event_spec.rb | 109 + .../ruby/spec/models/user_preferences_spec.rb | 10 +- auto-generated/ruby/spec/models/user_spec.rb | 4 +- .../ruby/spec/models/wallet_spec.rb | 4 +- auto-generated/ruby/spec/models/x_any_spec.rb | 4 +- auto-generated/ruby/spec/spec_helper.rb | 4 +- auto-generated/ruby/swagger_client.gemspec | 6 +- auto-generated/scala/.swagger-codegen/VERSION | 2 +- .../scala/io/swagger/client/ApiInvoker.scala | 2 +- .../io/swagger/client/api/APIKeyApi.scala | 188 +- .../swagger/client/api/AnnouncementApi.scala | 4 +- .../scala/io/swagger/client/api/ChatApi.scala | 4 +- .../io/swagger/client/api/ExecutionApi.scala | 12 +- .../io/swagger/client/api/FundingApi.scala | 8 +- ...nApi.scala => GlobalNotificationApi.scala} | 32 +- .../io/swagger/client/api/InstrumentApi.scala | 29 +- .../io/swagger/client/api/InsuranceApi.scala | 8 +- .../swagger/client/api/LeaderboardApi.scala | 16 +- .../swagger/client/api/LiquidationApi.scala | 8 +- .../io/swagger/client/api/OrderApi.scala | 52 +- .../io/swagger/client/api/OrderBookApi.scala | 4 +- .../io/swagger/client/api/PositionApi.scala | 8 +- .../io/swagger/client/api/QuoteApi.scala | 16 +- .../io/swagger/client/api/SchemaApi.scala | 4 +- .../io/swagger/client/api/SettlementApi.scala | 8 +- .../io/swagger/client/api/StatsApi.scala | 4 +- .../io/swagger/client/api/TradeApi.scala | 16 +- .../scala/io/swagger/client/api/UserApi.scala | 400 +-- .../io/swagger/client/api/UserEventApi.scala | 141 + .../io/swagger/client/model/APIKey.scala | 2 +- .../io/swagger/client/model/AccessToken.scala | 2 +- .../io/swagger/client/model/Affiliate.scala | 6 +- .../swagger/client/model/Announcement.scala | 2 +- .../scala/io/swagger/client/model/Chat.scala | 2 +- .../io/swagger/client/model/ChatChannel.scala | 2 +- .../client/model/CommunicationToken.scala | 22 + .../swagger/client/model/ConnectedUsers.scala | 2 +- .../scala/io/swagger/client/model/Error.scala | 2 +- .../io/swagger/client/model/ErrorError.scala | 2 +- .../io/swagger/client/model/Execution.scala | 2 +- .../io/swagger/client/model/Funding.scala | 2 +- .../client/model/GlobalNotification.scala | 29 + .../swagger/client/model/IndexComposite.scala | 2 +- .../client/model/InlineResponse200.scala | 4 +- .../client/model/InlineResponse2001.scala | 19 - .../io/swagger/client/model/Instrument.scala | 4 +- .../client/model/InstrumentInterval.scala | 2 +- .../io/swagger/client/model/Insurance.scala | 2 +- .../io/swagger/client/model/Leaderboard.scala | 2 +- .../io/swagger/client/model/Liquidation.scala | 2 +- .../io/swagger/client/model/Margin.scala | 2 +- .../swagger/client/model/Notification.scala | 29 - .../scala/io/swagger/client/model/Order.scala | 2 +- .../io/swagger/client/model/OrderBookL2.scala | 2 +- .../io/swagger/client/model/Position.scala | 2 +- .../scala/io/swagger/client/model/Quote.scala | 2 +- .../swagger/client/model/QuoteFillRatio.scala | 26 + .../io/swagger/client/model/Settlement.scala | 2 +- .../scala/io/swagger/client/model/Stats.scala | 2 +- .../swagger/client/model/StatsHistory.scala | 2 +- .../io/swagger/client/model/StatsUSD.scala | 2 +- .../scala/io/swagger/client/model/Trade.scala | 2 +- .../io/swagger/client/model/TradeBin.scala | 2 +- .../io/swagger/client/model/Transaction.scala | 2 +- .../scala/io/swagger/client/model/User.scala | 2 +- .../swagger/client/model/UserCommission.scala | 22 - .../model/UserCommissionsBySymbol.scala | 18 + .../io/swagger/client/model/UserEvent.scala | 30 + .../client/model/UserPreferences.scala | 3 +- .../io/swagger/client/model/Wallet.scala | 2 +- .../scala/io/swagger/client/model/XAny.scala | 2 +- .../swagger-yaml/.swagger-codegen/VERSION | 2 +- auto-generated/swagger-yaml/swagger.yaml | 2389 +++++++-------- .../swagger/.swagger-codegen/VERSION | 2 +- auto-generated/swagger/swagger.json | 2191 +++++++------- .../swift4/.swagger-codegen/VERSION | 2 +- .../SwaggerClient/Classes/Swaggers/APIs.swift | 2 +- .../Classes/Swaggers/APIs/APIKeyAPI.swift | 243 +- .../Swaggers/APIs/AnnouncementAPI.swift | 6 +- .../Classes/Swaggers/APIs/ChatAPI.swift | 6 +- .../Classes/Swaggers/APIs/ExecutionAPI.swift | 20 +- .../Classes/Swaggers/APIs/FundingAPI.swift | 4 +- ...nAPI.swift => GlobalNotificationAPI.swift} | 28 +- .../Classes/Swaggers/APIs/InstrumentAPI.swift | 399 +-- .../Classes/Swaggers/APIs/InsuranceAPI.swift | 4 +- .../Swaggers/APIs/LeaderboardAPI.swift | 14 +- .../Swaggers/APIs/LiquidationAPI.swift | 4 +- .../Classes/Swaggers/APIs/OrderAPI.swift | 96 +- .../Classes/Swaggers/APIs/PositionAPI.swift | 32 +- .../Classes/Swaggers/APIs/QuoteAPI.swift | 9 +- .../Classes/Swaggers/APIs/SettlementAPI.swift | 4 +- .../Classes/Swaggers/APIs/TradeAPI.swift | 9 +- .../Classes/Swaggers/APIs/UserAPI.swift | 554 ++-- .../Classes/Swaggers/APIs/UserEventAPI.swift | 87 + .../Swaggers/AlamofireImplementations.swift | 15 +- .../Classes/Swaggers/CodableHelper.swift | 39 +- .../Classes/Swaggers/Models/Affiliate.swift | 6 +- .../Swaggers/Models/CommunicationToken.swift | 36 + ...ication.swift => GlobalNotification.swift} | 4 +- .../Swaggers/Models/InlineResponse200.swift | 6 +- .../Swaggers/Models/InlineResponse2001.swift | 22 - .../Classes/Swaggers/Models/Instrument.swift | 6 +- .../Swaggers/Models/QuoteFillRatio.swift | 35 + .../Swaggers/Models/UserCommission.swift | 28 - .../Models/UserCommissionsBySymbol.swift | 18 + .../Classes/Swaggers/Models/UserEvent.swift | 88 + .../Swaggers/Models/UserPreferences.swift | 4 +- .../typescript-node/.swagger-codegen/VERSION | 2 +- auto-generated/typescript-node/api.ts | 1940 ++++++------ build.sh | 4 +- docs/dynamic-html/.swagger-codegen/VERSION | 2 +- docs/dynamic-html/docs/index.html | 36 +- docs/dynamic-html/docs/models/Affiliate.html | 10 + .../docs/models/CommunicationToken.html | 22 + ...ification.html => GlobalNotification.html} | 2 +- .../docs/models/Inline_response_200.html | 2 +- .../docs/models/Inline_response_200_1.html | 7 - docs/dynamic-html/docs/models/Instrument.html | 10 + .../docs/models/QuoteFillRatio.html | 37 + .../docs/models/UserCommission.html | 22 - .../docs/models/UserCommissionsBySymbol.html | 2 + docs/dynamic-html/docs/models/UserEvent.html | 92 + .../docs/models/UserPreferences.html | 5 + .../docs/operations/APIKeyApi.html | 142 +- .../docs/operations/AnnouncementApi.html | 4 +- .../dynamic-html/docs/operations/ChatApi.html | 8 +- .../docs/operations/ExecutionApi.html | 8 +- .../docs/operations/FundingApi.html | 4 +- ...ionApi.html => GlobalNotificationApi.html} | 6 +- .../docs/operations/InstrumentApi.html | 27 +- .../docs/operations/InsuranceApi.html | 4 +- .../docs/operations/LeaderboardApi.html | 6 +- .../docs/operations/LiquidationApi.html | 4 +- .../docs/operations/OrderApi.html | 42 +- .../docs/operations/OrderBookApi.html | 2 +- .../docs/operations/PositionApi.html | 12 +- .../docs/operations/QuoteApi.html | 10 +- .../docs/operations/SchemaApi.html | 4 +- .../docs/operations/SettlementApi.html | 4 +- .../docs/operations/StatsApi.html | 6 +- .../docs/operations/TradeApi.html | 10 +- .../dynamic-html/docs/operations/UserApi.html | 306 +- .../docs/operations/UserEventApi.html | 40 + docs/html/.swagger-codegen/VERSION | 2 +- docs/html/index.html | 2363 ++++++++------- swagger.json | 1567 +++++++--- 1782 files changed, 55153 insertions(+), 46441 deletions(-) create mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/api/GlobalNotificationApi.scala delete mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/api/NotificationApi.scala create mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/api/UserEventApi.scala create mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/model/CommunicationToken.scala create mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/model/GlobalNotification.scala delete mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InlineResponse2001.scala delete mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Notification.scala create mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/model/QuoteFillRatio.scala delete mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserCommission.scala create mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserCommissionsBySymbol.scala create mode 100644 auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserEvent.scala create mode 100644 auto-generated/android/docs/CommunicationToken.md rename auto-generated/android/docs/{Notification.md => GlobalNotification.md} (96%) create mode 100644 auto-generated/android/docs/GlobalNotificationApi.md delete mode 100644 auto-generated/android/docs/NotificationApi.md create mode 100644 auto-generated/android/docs/QuoteFillRatio.md delete mode 100644 auto-generated/android/docs/UserCommission.md rename auto-generated/android/docs/{InlineResponse2001.md => UserCommissionsBySymbol.md} (65%) create mode 100644 auto-generated/android/docs/UserEvent.md create mode 100644 auto-generated/android/docs/UserEventApi.md rename auto-generated/android/src/main/java/io/swagger/client/api/{NotificationApi.java => GlobalNotificationApi.java} (64%) create mode 100644 auto-generated/android/src/main/java/io/swagger/client/api/UserEventApi.java create mode 100644 auto-generated/android/src/main/java/io/swagger/client/model/CommunicationToken.java rename auto-generated/android/src/main/java/io/swagger/client/model/{Notification.java => GlobalNotification.java} (63%) delete mode 100644 auto-generated/android/src/main/java/io/swagger/client/model/InlineResponse2001.java create mode 100644 auto-generated/android/src/main/java/io/swagger/client/model/QuoteFillRatio.java delete mode 100644 auto-generated/android/src/main/java/io/swagger/client/model/UserCommission.java create mode 100644 auto-generated/android/src/main/java/io/swagger/client/model/UserCommissionsBySymbol.java create mode 100644 auto-generated/android/src/main/java/io/swagger/client/model/UserEvent.java rename auto-generated/clojure/src/bit_mex_api/api/{notification.clj => global_notification.clj} (62%) create mode 100644 auto-generated/clojure/src/bit_mex_api/api/user_event.clj rename auto-generated/cpprest/api/{NotificationApi.cpp => GlobalNotificationApi.cpp} (72%) create mode 100644 auto-generated/cpprest/api/GlobalNotificationApi.h delete mode 100644 auto-generated/cpprest/api/NotificationApi.h create mode 100644 auto-generated/cpprest/api/UserEventApi.cpp create mode 100644 auto-generated/cpprest/api/UserEventApi.h create mode 100644 auto-generated/cpprest/model/CommunicationToken.cpp create mode 100644 auto-generated/cpprest/model/CommunicationToken.h rename auto-generated/cpprest/model/{Notification.cpp => GlobalNotification.cpp} (61%) rename auto-generated/cpprest/model/{Notification.h => GlobalNotification.h} (63%) delete mode 100644 auto-generated/cpprest/model/Inline_response_200_1.cpp delete mode 100644 auto-generated/cpprest/model/Inline_response_200_1.h create mode 100644 auto-generated/cpprest/model/QuoteFillRatio.cpp create mode 100644 auto-generated/cpprest/model/QuoteFillRatio.h delete mode 100644 auto-generated/cpprest/model/UserCommission.cpp delete mode 100644 auto-generated/cpprest/model/UserCommission.h create mode 100644 auto-generated/cpprest/model/UserCommissionsBySymbol.cpp create mode 100644 auto-generated/cpprest/model/UserCommissionsBySymbol.h create mode 100644 auto-generated/cpprest/model/UserEvent.cpp create mode 100644 auto-generated/cpprest/model/UserEvent.h create mode 100644 auto-generated/csharp/docs/CommunicationToken.md rename auto-generated/csharp/docs/{Notification.md => GlobalNotification.md} (94%) rename auto-generated/csharp/docs/{NotificationApi.md => GlobalNotificationApi.md} (59%) create mode 100644 auto-generated/csharp/docs/QuoteFillRatio.md delete mode 100644 auto-generated/csharp/docs/UserCommission.md rename auto-generated/csharp/docs/{InlineResponse2001.md => UserCommissionsBySymbol.md} (78%) create mode 100644 auto-generated/csharp/docs/UserEvent.md create mode 100644 auto-generated/csharp/docs/UserEventApi.md create mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Api/GlobalNotificationApiTests.cs delete mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Api/NotificationApiTests.cs create mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Api/UserEventApiTests.cs create mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Model/CommunicationTokenTests.cs rename auto-generated/csharp/src/IO.Swagger.Test/Model/{NotificationTests.cs => GlobalNotificationTests.cs} (61%) delete mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Model/InlineResponse2001Tests.cs create mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Model/QuoteFillRatioTests.cs delete mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Model/UserCommissionTests.cs create mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Model/UserCommissionsBySymbolTests.cs create mode 100644 auto-generated/csharp/src/IO.Swagger.Test/Model/UserEventTests.cs rename auto-generated/csharp/src/IO.Swagger/Api/{NotificationApi.cs => GlobalNotificationApi.cs} (68%) create mode 100644 auto-generated/csharp/src/IO.Swagger/Api/UserEventApi.cs create mode 100644 auto-generated/csharp/src/IO.Swagger/Model/CommunicationToken.cs rename auto-generated/csharp/src/IO.Swagger/Model/{Notification.cs => GlobalNotification.cs} (81%) delete mode 100644 auto-generated/csharp/src/IO.Swagger/Model/InlineResponse2001.cs create mode 100644 auto-generated/csharp/src/IO.Swagger/Model/QuoteFillRatio.cs delete mode 100644 auto-generated/csharp/src/IO.Swagger/Model/UserCommission.cs create mode 100644 auto-generated/csharp/src/IO.Swagger/Model/UserCommissionsBySymbol.cs create mode 100644 auto-generated/csharp/src/IO.Swagger/Model/UserEvent.cs rename auto-generated/go/{api_notification.go => api_global_notification.go} (69%) create mode 100644 auto-generated/go/api_user_event.go rename auto-generated/{objc/docs/SWGUserCommission.md => go/docs/CommunicationToken.md} (56%) rename auto-generated/go/docs/{Notification.md => GlobalNotification.md} (97%) rename auto-generated/go/docs/{NotificationApi.md => GlobalNotificationApi.md} (55%) create mode 100644 auto-generated/go/docs/QuoteFillRatio.md delete mode 100644 auto-generated/go/docs/UserCommission.md rename auto-generated/{python/docs/InlineResponse2001.md => go/docs/UserCommissionsBySymbol.md} (82%) create mode 100644 auto-generated/go/docs/UserEvent.md create mode 100644 auto-generated/go/docs/UserEventApi.md create mode 100644 auto-generated/go/model_communication_token.go create mode 100644 auto-generated/go/model_global_notification.go delete mode 100644 auto-generated/go/model_inline_response_200_1.go delete mode 100644 auto-generated/go/model_notification.go create mode 100644 auto-generated/go/model_quote_fill_ratio.go delete mode 100644 auto-generated/go/model_user_commission.go create mode 100644 auto-generated/go/model_user_commissions_by_symbol.go create mode 100644 auto-generated/go/model_user_event.go create mode 100644 auto-generated/java/docs/CommunicationToken.md rename auto-generated/java/docs/{Notification.md => GlobalNotification.md} (97%) rename auto-generated/java/docs/{NotificationApi.md => GlobalNotificationApi.md} (58%) create mode 100644 auto-generated/java/docs/QuoteFillRatio.md delete mode 100644 auto-generated/java/docs/UserCommission.md rename auto-generated/java/docs/{InlineResponse2001.md => UserCommissionsBySymbol.md} (65%) create mode 100644 auto-generated/java/docs/UserEvent.md create mode 100644 auto-generated/java/docs/UserEventApi.md rename auto-generated/java/src/main/java/io/swagger/client/api/{NotificationApi.java => GlobalNotificationApi.java} (59%) create mode 100644 auto-generated/java/src/main/java/io/swagger/client/api/UserEventApi.java create mode 100644 auto-generated/java/src/main/java/io/swagger/client/model/CommunicationToken.java rename auto-generated/java/src/main/java/io/swagger/client/model/{Notification.java => GlobalNotification.java} (70%) delete mode 100644 auto-generated/java/src/main/java/io/swagger/client/model/InlineResponse2001.java create mode 100644 auto-generated/java/src/main/java/io/swagger/client/model/QuoteFillRatio.java delete mode 100644 auto-generated/java/src/main/java/io/swagger/client/model/UserCommission.java create mode 100644 auto-generated/java/src/main/java/io/swagger/client/model/UserCommissionsBySymbol.java create mode 100644 auto-generated/java/src/main/java/io/swagger/client/model/UserEvent.java create mode 100644 auto-generated/java/src/test/java/io/swagger/client/api/GlobalNotificationApiTest.java delete mode 100644 auto-generated/java/src/test/java/io/swagger/client/api/NotificationApiTest.java create mode 100644 auto-generated/java/src/test/java/io/swagger/client/api/UserEventApiTest.java create mode 100644 auto-generated/javascript/docs/CommunicationToken.md rename auto-generated/javascript/docs/{Notification.md => GlobalNotification.md} (95%) rename auto-generated/javascript/docs/{NotificationApi.md => GlobalNotificationApi.md} (62%) create mode 100644 auto-generated/javascript/docs/QuoteFillRatio.md delete mode 100644 auto-generated/javascript/docs/UserCommission.md rename auto-generated/javascript/docs/{InlineResponse2001.md => UserCommissionsBySymbol.md} (61%) create mode 100644 auto-generated/javascript/docs/UserEvent.md create mode 100644 auto-generated/javascript/docs/UserEventApi.md create mode 100644 auto-generated/javascript/src/api/GlobalNotificationApi.js delete mode 100644 auto-generated/javascript/src/api/NotificationApi.js create mode 100644 auto-generated/javascript/src/api/UserEventApi.js create mode 100644 auto-generated/javascript/src/model/CommunicationToken.js create mode 100644 auto-generated/javascript/src/model/GlobalNotification.js delete mode 100644 auto-generated/javascript/src/model/InlineResponse2001.js delete mode 100644 auto-generated/javascript/src/model/Notification.js create mode 100644 auto-generated/javascript/src/model/QuoteFillRatio.js delete mode 100644 auto-generated/javascript/src/model/UserCommission.js create mode 100644 auto-generated/javascript/src/model/UserCommissionsBySymbol.js create mode 100644 auto-generated/javascript/src/model/UserEvent.js create mode 100644 auto-generated/javascript/test/api/GlobalNotificationApi.spec.js delete mode 100644 auto-generated/javascript/test/api/NotificationApi.spec.js create mode 100644 auto-generated/javascript/test/api/UserEventApi.spec.js create mode 100644 auto-generated/javascript/test/assert-equals.js create mode 100644 auto-generated/javascript/test/model/CommunicationToken.spec.js create mode 100644 auto-generated/javascript/test/model/GlobalNotification.spec.js delete mode 100644 auto-generated/javascript/test/model/InlineResponse2001.spec.js delete mode 100644 auto-generated/javascript/test/model/Notification.spec.js create mode 100644 auto-generated/javascript/test/model/QuoteFillRatio.spec.js delete mode 100644 auto-generated/javascript/test/model/UserCommission.spec.js create mode 100644 auto-generated/javascript/test/model/UserCommissionsBySymbol.spec.js create mode 100644 auto-generated/javascript/test/model/UserEvent.spec.js create mode 100644 auto-generated/objc/SwaggerClient/Api/SWGGlobalNotificationApi.h rename auto-generated/objc/SwaggerClient/Api/{SWGNotificationApi.m => SWGGlobalNotificationApi.m} (78%) delete mode 100644 auto-generated/objc/SwaggerClient/Api/SWGNotificationApi.h create mode 100644 auto-generated/objc/SwaggerClient/Api/SWGUserEventApi.h create mode 100644 auto-generated/objc/SwaggerClient/Api/SWGUserEventApi.m create mode 100644 auto-generated/objc/SwaggerClient/Model/SWGCommunicationToken.h rename auto-generated/objc/SwaggerClient/Model/{SWGUserCommission.m => SWGCommunicationToken.m} (70%) create mode 100644 auto-generated/objc/SwaggerClient/Model/SWGGlobalNotification.h rename auto-generated/objc/SwaggerClient/Model/{SWGNotification.m => SWGGlobalNotification.m} (93%) delete mode 100644 auto-generated/objc/SwaggerClient/Model/SWGInlineResponse2001.h delete mode 100644 auto-generated/objc/SwaggerClient/Model/SWGNotification.h create mode 100644 auto-generated/objc/SwaggerClient/Model/SWGQuoteFillRatio.h create mode 100644 auto-generated/objc/SwaggerClient/Model/SWGQuoteFillRatio.m delete mode 100644 auto-generated/objc/SwaggerClient/Model/SWGUserCommission.h create mode 100644 auto-generated/objc/SwaggerClient/Model/SWGUserCommissionsBySymbol.h rename auto-generated/objc/SwaggerClient/Model/{SWGInlineResponse2001.m => SWGUserCommissionsBySymbol.m} (82%) create mode 100644 auto-generated/objc/SwaggerClient/Model/SWGUserEvent.h create mode 100644 auto-generated/objc/SwaggerClient/Model/SWGUserEvent.m create mode 100644 auto-generated/objc/docs/SWGCommunicationToken.md rename auto-generated/objc/docs/{SWGNotification.md => SWGGlobalNotification.md} (96%) rename auto-generated/objc/docs/{SWGNotificationApi.md => SWGGlobalNotificationApi.md} (59%) create mode 100644 auto-generated/objc/docs/SWGQuoteFillRatio.md rename auto-generated/{php/SwaggerClient-php/docs/Model/InlineResponse2001.md => objc/docs/SWGUserCommissionsBySymbol.md} (82%) create mode 100644 auto-generated/objc/docs/SWGUserEvent.md create mode 100644 auto-generated/objc/docs/SWGUserEventApi.md rename auto-generated/php/SwaggerClient-php/docs/Api/{NotificationApi.md => GlobalNotificationApi.md} (66%) create mode 100644 auto-generated/php/SwaggerClient-php/docs/Api/UserEventApi.md create mode 100644 auto-generated/php/SwaggerClient-php/docs/Model/CommunicationToken.md rename auto-generated/php/SwaggerClient-php/docs/Model/{Notification.md => GlobalNotification.md} (97%) create mode 100644 auto-generated/php/SwaggerClient-php/docs/Model/QuoteFillRatio.md delete mode 100644 auto-generated/php/SwaggerClient-php/docs/Model/UserCommission.md rename auto-generated/{objc/docs/SWGInlineResponse2001.md => php/SwaggerClient-php/docs/Model/UserCommissionsBySymbol.md} (80%) create mode 100644 auto-generated/php/SwaggerClient-php/docs/Model/UserEvent.md rename auto-generated/php/SwaggerClient-php/lib/Api/{NotificationApi.php => GlobalNotificationApi.php} (73%) create mode 100644 auto-generated/php/SwaggerClient-php/lib/Api/UserEventApi.php rename auto-generated/php/SwaggerClient-php/lib/Model/{UserCommission.php => CommunicationToken.php} (58%) rename auto-generated/php/SwaggerClient-php/lib/Model/{Notification.php => GlobalNotification.php} (88%) create mode 100644 auto-generated/php/SwaggerClient-php/lib/Model/QuoteFillRatio.php rename auto-generated/php/SwaggerClient-php/lib/Model/{InlineResponse2001.php => UserCommissionsBySymbol.php} (70%) create mode 100644 auto-generated/php/SwaggerClient-php/lib/Model/UserEvent.php create mode 100644 auto-generated/php/SwaggerClient-php/test/Api/GlobalNotificationApiTest.php delete mode 100644 auto-generated/php/SwaggerClient-php/test/Api/NotificationApiTest.php create mode 100644 auto-generated/php/SwaggerClient-php/test/Api/UserEventApiTest.php create mode 100644 auto-generated/php/SwaggerClient-php/test/Model/CommunicationTokenTest.php rename auto-generated/php/SwaggerClient-php/test/Model/{NotificationTest.php => GlobalNotificationTest.php} (57%) delete mode 100644 auto-generated/php/SwaggerClient-php/test/Model/InlineResponse2001Test.php create mode 100644 auto-generated/php/SwaggerClient-php/test/Model/QuoteFillRatioTest.php delete mode 100644 auto-generated/php/SwaggerClient-php/test/Model/UserCommissionTest.php create mode 100644 auto-generated/php/SwaggerClient-php/test/Model/UserCommissionsBySymbolTest.php create mode 100644 auto-generated/php/SwaggerClient-php/test/Model/UserEventTest.php create mode 100644 auto-generated/python/docs/CommunicationToken.md rename auto-generated/python/docs/{Notification.md => GlobalNotification.md} (96%) rename auto-generated/python/docs/{NotificationApi.md => GlobalNotificationApi.md} (61%) create mode 100644 auto-generated/python/docs/QuoteFillRatio.md delete mode 100644 auto-generated/python/docs/UserCommission.md rename auto-generated/{go/docs/InlineResponse2001.md => python/docs/UserCommissionsBySymbol.md} (78%) create mode 100644 auto-generated/python/docs/UserEvent.md create mode 100644 auto-generated/python/docs/UserEventApi.md rename auto-generated/python/swagger_client/api/{notification_api.py => global_notification_api.py} (53%) create mode 100644 auto-generated/python/swagger_client/api/user_event_api.py create mode 100644 auto-generated/python/swagger_client/models/communication_token.py rename auto-generated/python/swagger_client/models/{notification.py => global_notification.py} (60%) delete mode 100644 auto-generated/python/swagger_client/models/inline_response2001.py create mode 100644 auto-generated/python/swagger_client/models/quote_fill_ratio.py delete mode 100644 auto-generated/python/swagger_client/models/user_commission.py create mode 100644 auto-generated/python/swagger_client/models/user_commissions_by_symbol.py create mode 100644 auto-generated/python/swagger_client/models/user_event.py create mode 100644 auto-generated/python/test/test_communication_token.py create mode 100644 auto-generated/python/test/test_global_notification.py create mode 100644 auto-generated/python/test/test_global_notification_api.py delete mode 100644 auto-generated/python/test/test_inline_response2001.py delete mode 100644 auto-generated/python/test/test_notification.py delete mode 100644 auto-generated/python/test/test_notification_api.py create mode 100644 auto-generated/python/test/test_quote_fill_ratio.py delete mode 100644 auto-generated/python/test/test_user_commission.py create mode 100644 auto-generated/python/test/test_user_commissions_by_symbol.py create mode 100644 auto-generated/python/test/test_user_event.py create mode 100644 auto-generated/python/test/test_user_event_api.py create mode 100644 auto-generated/qt5cpp/client/SWGCommunicationToken.cpp create mode 100644 auto-generated/qt5cpp/client/SWGCommunicationToken.h rename auto-generated/qt5cpp/client/{SWGNotification.cpp => SWGGlobalNotification.cpp} (66%) rename auto-generated/qt5cpp/client/{SWGNotification.h => SWGGlobalNotification.h} (50%) create mode 100644 auto-generated/qt5cpp/client/SWGGlobalNotificationApi.cpp create mode 100644 auto-generated/qt5cpp/client/SWGGlobalNotificationApi.h delete mode 100644 auto-generated/qt5cpp/client/SWGInline_response_200_1.cpp delete mode 100644 auto-generated/qt5cpp/client/SWGInline_response_200_1.h delete mode 100644 auto-generated/qt5cpp/client/SWGNotificationApi.cpp delete mode 100644 auto-generated/qt5cpp/client/SWGNotificationApi.h create mode 100644 auto-generated/qt5cpp/client/SWGQuoteFillRatio.cpp create mode 100644 auto-generated/qt5cpp/client/SWGQuoteFillRatio.h delete mode 100644 auto-generated/qt5cpp/client/SWGUserCommission.cpp delete mode 100644 auto-generated/qt5cpp/client/SWGUserCommission.h create mode 100644 auto-generated/qt5cpp/client/SWGUserCommissionsBySymbol.cpp create mode 100644 auto-generated/qt5cpp/client/SWGUserCommissionsBySymbol.h create mode 100644 auto-generated/qt5cpp/client/SWGUserEvent.cpp create mode 100644 auto-generated/qt5cpp/client/SWGUserEvent.h create mode 100644 auto-generated/qt5cpp/client/SWGUserEventApi.cpp create mode 100644 auto-generated/qt5cpp/client/SWGUserEventApi.h create mode 100644 auto-generated/ruby/docs/CommunicationToken.md rename auto-generated/ruby/docs/{Notification.md => GlobalNotification.md} (93%) rename auto-generated/ruby/docs/{NotificationApi.md => GlobalNotificationApi.md} (57%) create mode 100644 auto-generated/ruby/docs/QuoteFillRatio.md delete mode 100644 auto-generated/ruby/docs/UserCommission.md rename auto-generated/ruby/docs/{InlineResponse2001.md => UserCommissionsBySymbol.md} (59%) create mode 100644 auto-generated/ruby/docs/UserEvent.md create mode 100644 auto-generated/ruby/docs/UserEventApi.md create mode 100644 auto-generated/ruby/lib/swagger_client/api/global_notification_api.rb delete mode 100644 auto-generated/ruby/lib/swagger_client/api/notification_api.rb create mode 100644 auto-generated/ruby/lib/swagger_client/api/user_event_api.rb rename auto-generated/ruby/lib/swagger_client/models/{user_commission.rb => communication_token.rb} (61%) rename auto-generated/ruby/lib/swagger_client/models/{notification.rb => global_notification.rb} (85%) create mode 100644 auto-generated/ruby/lib/swagger_client/models/quote_fill_ratio.rb rename auto-generated/ruby/lib/swagger_client/models/{inline_response_200_1.rb => user_commissions_by_symbol.rb} (73%) create mode 100644 auto-generated/ruby/lib/swagger_client/models/user_event.rb create mode 100644 auto-generated/ruby/spec/api/global_notification_api_spec.rb delete mode 100644 auto-generated/ruby/spec/api/notification_api_spec.rb create mode 100644 auto-generated/ruby/spec/api/user_event_api_spec.rb create mode 100644 auto-generated/ruby/spec/models/communication_token_spec.rb rename auto-generated/ruby/spec/models/{notification_spec.rb => global_notification_spec.rb} (58%) delete mode 100644 auto-generated/ruby/spec/models/inline_response_200_1_spec.rb create mode 100644 auto-generated/ruby/spec/models/quote_fill_ratio_spec.rb delete mode 100644 auto-generated/ruby/spec/models/user_commission_spec.rb create mode 100644 auto-generated/ruby/spec/models/user_commissions_by_symbol_spec.rb create mode 100644 auto-generated/ruby/spec/models/user_event_spec.rb rename auto-generated/scala/src/main/scala/io/swagger/client/api/{NotificationApi.scala => GlobalNotificationApi.scala} (56%) create mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/api/UserEventApi.scala create mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/model/CommunicationToken.scala create mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/model/GlobalNotification.scala delete mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/model/InlineResponse2001.scala delete mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/model/Notification.scala create mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/model/QuoteFillRatio.scala delete mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/model/UserCommission.scala create mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/model/UserCommissionsBySymbol.scala create mode 100644 auto-generated/scala/src/main/scala/io/swagger/client/model/UserEvent.scala rename auto-generated/swift4/SwaggerClient/Classes/Swaggers/APIs/{NotificationAPI.swift => GlobalNotificationAPI.swift} (66%) create mode 100644 auto-generated/swift4/SwaggerClient/Classes/Swaggers/APIs/UserEventAPI.swift create mode 100644 auto-generated/swift4/SwaggerClient/Classes/Swaggers/Models/CommunicationToken.swift rename auto-generated/swift4/SwaggerClient/Classes/Swaggers/Models/{Notification.swift => GlobalNotification.swift} (94%) delete mode 100644 auto-generated/swift4/SwaggerClient/Classes/Swaggers/Models/InlineResponse2001.swift create mode 100644 auto-generated/swift4/SwaggerClient/Classes/Swaggers/Models/QuoteFillRatio.swift delete mode 100644 auto-generated/swift4/SwaggerClient/Classes/Swaggers/Models/UserCommission.swift create mode 100644 auto-generated/swift4/SwaggerClient/Classes/Swaggers/Models/UserCommissionsBySymbol.swift create mode 100644 auto-generated/swift4/SwaggerClient/Classes/Swaggers/Models/UserEvent.swift create mode 100644 docs/dynamic-html/docs/models/CommunicationToken.html rename docs/dynamic-html/docs/models/{Notification.html => GlobalNotification.html} (97%) delete mode 100644 docs/dynamic-html/docs/models/Inline_response_200_1.html create mode 100644 docs/dynamic-html/docs/models/QuoteFillRatio.html delete mode 100644 docs/dynamic-html/docs/models/UserCommission.html create mode 100644 docs/dynamic-html/docs/models/UserCommissionsBySymbol.html create mode 100644 docs/dynamic-html/docs/models/UserEvent.html rename docs/dynamic-html/docs/operations/{NotificationApi.html => GlobalNotificationApi.html} (62%) create mode 100644 docs/dynamic-html/docs/operations/UserEventApi.html diff --git a/auto-generated/akka-scala/.swagger-codegen/VERSION b/auto-generated/akka-scala/.swagger-codegen/VERSION index 855ff9501..a4533be7f 100644 --- a/auto-generated/akka-scala/.swagger-codegen/VERSION +++ b/auto-generated/akka-scala/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +2.4.11-SNAPSHOT \ No newline at end of file diff --git a/auto-generated/akka-scala/README.md b/auto-generated/akka-scala/README.md index f2a366e46..62e2a5bd3 100644 --- a/auto-generated/akka-scala/README.md +++ b/auto-generated/akka-scala/README.md @@ -3,7 +3,7 @@ BitMEX API - API version: 1.2.0 -## 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. +## 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. *Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)* @@ -61,15 +61,11 @@ libraryDependencies += "io.swagger" % "swagger-client" % "1.0.0" ## Documentation for API Endpoints -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*APIKeyApi* | **aPIKey.disable** | **POST** /apiKey/disable | Disable an API Key. -*APIKeyApi* | **aPIKey.enable** | **POST** /apiKey/enable | Enable an API Key. *APIKeyApi* | **aPIKey.get** | **GET** /apiKey | Get your API Keys. -*APIKeyApi* | **aPIKey.new** | **POST** /apiKey | Create a new API Key. -*APIKeyApi* | **aPIKey.remove** | **DELETE** /apiKey | Remove an API Key. *AnnouncementApi* | **announcement.get** | **GET** /announcement | Get site announcements. *AnnouncementApi* | **announcement.getUrgent** | **GET** /announcement/urgent | Get urgent (banner) announcements. *ChatApi* | **chat.get** | **GET** /chat | Get chat messages. @@ -79,6 +75,7 @@ Class | Method | HTTP request | Description *ExecutionApi* | **execution.get** | **GET** /execution | Get all raw executions for your account. *ExecutionApi* | **execution.getTradeHistory** | **GET** /execution/tradeHistory | Get all balance-affecting executions. This includes each trade, insurance charge, and settlement. *FundingApi* | **funding.get** | **GET** /funding | Get funding history. +*GlobalNotificationApi* | **globalNotification.get** | **GET** /globalNotification | Get your current GlobalNotifications. *InstrumentApi* | **instrument.get** | **GET** /instrument | Get instruments. *InstrumentApi* | **instrument.getActive** | **GET** /instrument/active | Get all active instruments and instruments that have expired in <24hrs. *InstrumentApi* | **instrument.getActiveAndIndices** | **GET** /instrument/activeAndIndices | Helper method. Gets all active instruments and all indices. This is a join of the result of /indices and /active. @@ -89,7 +86,6 @@ Class | Method | HTTP request | Description *LeaderboardApi* | **leaderboard.get** | **GET** /leaderboard | Get current leaderboard. *LeaderboardApi* | **leaderboard.getName** | **GET** /leaderboard/name | Get your alias on the leaderboard. *LiquidationApi* | **liquidation.get** | **GET** /liquidation | Get liquidation orders. -*NotificationApi* | **notification.get** | **GET** /notification | Get your current notifications. *OrderApi* | **order.amend** | **PUT** /order | Amend the quantity or price of an open order. *OrderApi* | **order.amendBulk** | **PUT** /order/bulk | Amend multiple orders for the same symbol. *OrderApi* | **order.cancel** | **DELETE** /order | Cancel order(s). Send multiple order IDs to cancel in bulk. @@ -117,25 +113,24 @@ Class | Method | HTTP request | Description *TradeApi* | **trade.getBucketed** | **GET** /trade/bucketed | Get previous trades in time buckets. *UserApi* | **user.cancelWithdrawal** | **POST** /user/cancelWithdrawal | Cancel a withdrawal. *UserApi* | **user.checkReferralCode** | **GET** /user/checkReferralCode | Check if a referral code is valid. +*UserApi* | **user.communicationToken** | **POST** /user/communicationToken | Register your communication token for mobile clients *UserApi* | **user.confirm** | **POST** /user/confirmEmail | Confirm your email address with a token. -*UserApi* | **user.confirmEnableTFA** | **POST** /user/confirmEnableTFA | Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. *UserApi* | **user.confirmWithdrawal** | **POST** /user/confirmWithdrawal | Confirm a withdrawal. -*UserApi* | **user.disableTFA** | **POST** /user/disableTFA | Disable two-factor auth for this account. *UserApi* | **user.get** | **GET** /user | Get your user model. *UserApi* | **user.getAffiliateStatus** | **GET** /user/affiliateStatus | Get your current affiliate/referral status. *UserApi* | **user.getCommission** | **GET** /user/commission | Get your account's commission status. *UserApi* | **user.getDepositAddress** | **GET** /user/depositAddress | Get a deposit address. +*UserApi* | **user.getExecutionHistory** | **GET** /user/executionHistory | Get the execution history by day. *UserApi* | **user.getMargin** | **GET** /user/margin | Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. +*UserApi* | **user.getQuoteFillRatio** | **GET** /user/quoteFillRatio | Get 7 days worth of Quote Fill Ratio statistics. *UserApi* | **user.getWallet** | **GET** /user/wallet | Get your current wallet information. *UserApi* | **user.getWalletHistory** | **GET** /user/walletHistory | Get a history of all of your wallet transactions (deposits, withdrawals, PNL). *UserApi* | **user.getWalletSummary** | **GET** /user/walletSummary | Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). *UserApi* | **user.logout** | **POST** /user/logout | Log out of BitMEX. -*UserApi* | **user.logoutAll** | **POST** /user/logoutAll | Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. *UserApi* | **user.minWithdrawalFee** | **GET** /user/minWithdrawalFee | Get the minimum withdrawal fee for a currency. -*UserApi* | **user.requestEnableTFA** | **POST** /user/requestEnableTFA | Get secret key for setting up two-factor auth. *UserApi* | **user.requestWithdrawal** | **POST** /user/requestWithdrawal | Request a withdrawal to an external wallet. *UserApi* | **user.savePreferences** | **POST** /user/preferences | Save user preferences. -*UserApi* | **user.update** | **PUT** /user | Update your password, name, and other attributes. +*UserEventApi* | **userEvent.get** | **GET** /userEvent | Get your user events ## Documentation for Models @@ -146,25 +141,26 @@ Class | Method | HTTP request | Description - [Announcement](Announcement.md) - [Chat](Chat.md) - [ChatChannel](ChatChannel.md) + - [CommunicationToken](CommunicationToken.md) - [ConnectedUsers](ConnectedUsers.md) - [Error](Error.md) - [ErrorError](ErrorError.md) - [Execution](Execution.md) - [Funding](Funding.md) + - [GlobalNotification](GlobalNotification.md) - [IndexComposite](IndexComposite.md) - [InlineResponse200](InlineResponse200.md) - - [InlineResponse2001](InlineResponse2001.md) - [Instrument](Instrument.md) - [InstrumentInterval](InstrumentInterval.md) - [Insurance](Insurance.md) - [Leaderboard](Leaderboard.md) - [Liquidation](Liquidation.md) - [Margin](Margin.md) - - [Notification](Notification.md) - [Order](Order.md) - [OrderBookL2](OrderBookL2.md) - [Position](Position.md) - [Quote](Quote.md) + - [QuoteFillRatio](QuoteFillRatio.md) - [Settlement](Settlement.md) - [Stats](Stats.md) - [StatsHistory](StatsHistory.md) @@ -173,7 +169,8 @@ Class | Method | HTTP request | Description - [TradeBin](TradeBin.md) - [Transaction](Transaction.md) - [User](User.md) - - [UserCommission](UserCommission.md) + - [UserCommissionsBySymbol](UserCommissionsBySymbol.md) + - [UserEvent](UserEvent.md) - [UserPreferences](UserPreferences.md) - [Wallet](Wallet.md) - [XAny](XAny.md) @@ -182,16 +179,16 @@ Class | Method | HTTP request | Description ## Documentation for Authorization Authentication schemes defined for the API: -### apiKey +### apiExpires - **Type**: API key -- **API key parameter name**: api-key +- **API key parameter name**: api-expires - **Location**: HTTP header -### apiNonce +### apiKey - **Type**: API key -- **API key parameter name**: api-nonce +- **API key parameter name**: api-key - **Location**: HTTP header ### apiSignature diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/APIKeyApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/APIKeyApi.scala index 9f6c5a05b..0daa150c9 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/APIKeyApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/APIKeyApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -13,7 +13,6 @@ package io.swagger.client.api import io.swagger.client.model.APIKey import io.swagger.client.model.Error -import io.swagger.client.model.InlineResponse200 import io.swagger.client.core._ import io.swagger.client.core.CollectionFormats._ import io.swagger.client.core.ApiKeyLocations._ @@ -24,139 +23,29 @@ object APIKeyApi { * * * Expected answers: - * code 200 : APIKey (Request was successful) - * code 400 : Error (Parameter Error) - * code 401 : Error (Unauthorized) - * code 404 : Error (Not Found) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) - * - * @param apiKeyID API Key ID (public component). - */ - def aPIKey.disable(apiKeyID: String)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[APIKey] = - ApiRequest[APIKey](ApiMethods.POST, "https://localhost/api/v1", "/apiKey/disable", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withFormParam("apiKeyID", apiKeyID) - .withSuccessResponse[APIKey](200) - .withErrorResponse[Error](400) - .withErrorResponse[Error](401) - .withErrorResponse[Error](404) - /** - * - * - * Expected answers: - * code 200 : APIKey (Request was successful) - * code 400 : Error (Parameter Error) - * code 401 : Error (Unauthorized) - * code 404 : Error (Not Found) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) - * - * @param apiKeyID API Key ID (public component). - */ - def aPIKey.enable(apiKeyID: String)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[APIKey] = - ApiRequest[APIKey](ApiMethods.POST, "https://localhost/api/v1", "/apiKey/enable", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withFormParam("apiKeyID", apiKeyID) - .withSuccessResponse[APIKey](200) - .withErrorResponse[Error](400) - .withErrorResponse[Error](401) - .withErrorResponse[Error](404) - /** - * - * - * Expected answers: * code 200 : Seq[APIKey] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param reverse If true, will sort results newest first. */ def aPIKey.get(reverse: Option[Boolean])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[APIKey]] = - ApiRequest[Seq[APIKey]](ApiMethods.GET, "https://localhost/api/v1", "/apiKey", "application/json") + ApiRequest[Seq[APIKey]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/apiKey", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("reverse", reverse) .withSuccessResponse[Seq[APIKey]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) - .withErrorResponse[Error](404) - /** - * API Keys can only be created via the frontend. - * - * Expected answers: - * code 200 : APIKey (Request was successful) - * code 400 : Error (Parameter Error) - * code 401 : Error (Unauthorized) - * code 404 : Error (Not Found) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) - * - * @param name Key name. This name is for reference only. - * @param cidr CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. <a href=\"http://software77.net/cidr-101.html\">More on CIDR blocks</a> - * @param permissions Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"]. - * @param enabled Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. - * @param token OTP Token (YubiKey, Google Authenticator) - */ - def aPIKey.new(name: Option[String] = None, cidr: Option[String] = None, permissions: Option[String] = None, enabled: Option[Boolean], token: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[APIKey] = - ApiRequest[APIKey](ApiMethods.POST, "https://localhost/api/v1", "/apiKey", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withFormParam("name", name) - .withFormParam("cidr", cidr) - .withFormParam("permissions", permissions) - .withFormParam("enabled", enabled) - .withFormParam("token", token) - .withSuccessResponse[APIKey](200) - .withErrorResponse[Error](400) - .withErrorResponse[Error](401) - .withErrorResponse[Error](404) - /** - * - * - * Expected answers: - * code 200 : InlineResponse200 (Request was successful) - * code 400 : Error (Parameter Error) - * code 401 : Error (Unauthorized) - * code 404 : Error (Not Found) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) - * - * @param apiKeyID API Key ID (public component). - */ - def aPIKey.remove(apiKeyID: String)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[InlineResponse200] = - ApiRequest[InlineResponse200](ApiMethods.DELETE, "https://localhost/api/v1", "/apiKey", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withFormParam("apiKeyID", apiKeyID) - .withSuccessResponse[InlineResponse200](200) - .withErrorResponse[Error](400) - .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/AnnouncementApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/AnnouncementApi.scala index fad9a853c..8728a6867 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/AnnouncementApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/AnnouncementApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -26,16 +26,18 @@ object AnnouncementApi { * code 200 : Seq[Announcement] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * @param columns Array of column names to fetch. If omitted, will return all columns. */ def announcement.get(columns: Option[String] = None): ApiRequest[Seq[Announcement]] = - ApiRequest[Seq[Announcement]](ApiMethods.GET, "https://localhost/api/v1", "/announcement", "application/json") + ApiRequest[Seq[Announcement]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/announcement", "application/json") .withQueryParam("columns", columns) .withSuccessResponse[Seq[Announcement]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -44,21 +46,23 @@ object AnnouncementApi { * code 200 : Seq[Announcement] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) */ def announcement.getUrgent()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Announcement]] = - ApiRequest[Seq[Announcement]](ApiMethods.GET, "https://localhost/api/v1", "/announcement/urgent", "application/json") + ApiRequest[Seq[Announcement]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/announcement/urgent", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withSuccessResponse[Seq[Announcement]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/ChatApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/ChatApi.scala index 39210171e..d5b6cb344 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/ChatApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/ChatApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -28,6 +28,7 @@ object ChatApi { * code 200 : Seq[Chat] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * @param count Number of results to fetch. @@ -36,7 +37,7 @@ object ChatApi { * @param channelID Channel id. GET /chat/channels for ids. Leave blank for all. */ def chat.get(count: Option[Double], start: Option[Double], reverse: Option[Boolean], channelID: Option[Double] = None): ApiRequest[Seq[Chat]] = - ApiRequest[Seq[Chat]](ApiMethods.GET, "https://localhost/api/v1", "/chat", "application/json") + ApiRequest[Seq[Chat]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/chat", "application/json") .withQueryParam("count", count) .withQueryParam("start", start) .withQueryParam("reverse", reverse) @@ -44,6 +45,7 @@ object ChatApi { .withSuccessResponse[Seq[Chat]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -52,13 +54,15 @@ object ChatApi { * code 200 : Seq[ChatChannel] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def chat.getChannels(): ApiRequest[Seq[ChatChannel]] = - ApiRequest[Seq[ChatChannel]](ApiMethods.GET, "https://localhost/api/v1", "/chat/channels", "application/json") + ApiRequest[Seq[ChatChannel]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/chat/channels", "application/json") .withSuccessResponse[Seq[ChatChannel]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * Returns an array with browser users in the first position and API users (bots) in the second position. @@ -67,13 +71,15 @@ object ChatApi { * code 200 : ConnectedUsers (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def chat.getConnected(): ApiRequest[ConnectedUsers] = - ApiRequest[ConnectedUsers](ApiMethods.GET, "https://localhost/api/v1", "/chat/connected", "application/json") + ApiRequest[ConnectedUsers](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/chat/connected", "application/json") .withSuccessResponse[ConnectedUsers](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -82,26 +88,28 @@ object ChatApi { * code 200 : Chat (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param message * @param channelID Channel to post to. Default 1 (English). */ def chat.new(message: String, channelID: Option[Double])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Chat] = - ApiRequest[Chat](ApiMethods.POST, "https://localhost/api/v1", "/chat", "application/json") + ApiRequest[Chat](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/chat", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("message", message) .withFormParam("channelID", channelID) .withSuccessResponse[Chat](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/EnumsSerializers.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/EnumsSerializers.scala index fc50942a3..442a63594 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/EnumsSerializers.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/EnumsSerializers.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -11,13 +11,16 @@ */ package io.swagger.client.api +import io.swagger.client.model._ import org.json4s._ import scala.reflect.ClassTag object EnumsSerializers { def all: Seq[Serializer[_]] = Seq[Serializer[_]]() :+ - new EnumNameSerializer(NotificationEnums.`Type`) + new EnumNameSerializer(GlobalNotificationEnums.`Type`) :+ + new EnumNameSerializer(UserEventEnums.`Type`) :+ + new EnumNameSerializer(UserEventEnums.Status) private class EnumNameSerializer[E <: Enumeration: ClassTag](enum: E) extends Serializer[E#Value] { diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/ExecutionApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/ExecutionApi.scala index ef26a98e8..f44e04147 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/ExecutionApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/ExecutionApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -27,14 +27,15 @@ object ExecutionApi { * code 200 : Seq[Execution] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -44,9 +45,9 @@ object ExecutionApi { * @param endTime Ending date filter for results. */ def execution.get(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Execution]] = - ApiRequest[Seq[Execution]](ApiMethods.GET, "https://localhost/api/v1", "/execution", "application/json") + ApiRequest[Seq[Execution]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/execution", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) @@ -59,6 +60,7 @@ object ExecutionApi { .withSuccessResponse[Seq[Execution]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -67,14 +69,15 @@ object ExecutionApi { * code 200 : Seq[Execution] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -84,9 +87,9 @@ object ExecutionApi { * @param endTime Ending date filter for results. */ def execution.getTradeHistory(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Execution]] = - ApiRequest[Seq[Execution]](ApiMethods.GET, "https://localhost/api/v1", "/execution/tradeHistory", "application/json") + ApiRequest[Seq[Execution]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/execution/tradeHistory", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) @@ -99,6 +102,7 @@ object ExecutionApi { .withSuccessResponse[Seq[Execution]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/FundingApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/FundingApi.scala index cc32f09fb..27ce6bdb3 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/FundingApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/FundingApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -27,9 +27,10 @@ object FundingApi { * code 200 : Seq[Funding] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -39,7 +40,7 @@ object FundingApi { * @param endTime Ending date filter for results. */ def funding.get(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[Funding]] = - ApiRequest[Seq[Funding]](ApiMethods.GET, "https://localhost/api/v1", "/funding", "application/json") + ApiRequest[Seq[Funding]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/funding", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -51,6 +52,7 @@ object FundingApi { .withSuccessResponse[Seq[Funding]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/GlobalNotificationApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/GlobalNotificationApi.scala new file mode 100644 index 000000000..17973474a --- /dev/null +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/GlobalNotificationApi.scala @@ -0,0 +1,50 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.api + +import io.swagger.client.model.Error +import io.swagger.client.model.GlobalNotification +import io.swagger.client.core._ +import io.swagger.client.core.CollectionFormats._ +import io.swagger.client.core.ApiKeyLocations._ + +object GlobalNotificationApi { + + /** + * This is an upcoming feature and currently does not return data. + * + * Expected answers: + * code 200 : Seq[GlobalNotification] (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) + * + * Available security schemes: + * apiExpires (apiKey) + * apiKey (apiKey) + * apiSignature (apiKey) + */ + def globalNotification.get()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[GlobalNotification]] = + ApiRequest[Seq[GlobalNotification]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/globalNotification", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) + .withApiKey(apiKey, "api-key", HEADER) + .withApiKey(apiKey, "api-signature", HEADER) + .withSuccessResponse[Seq[GlobalNotification]](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) + + +} + diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/InstrumentApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/InstrumentApi.scala index d3750af56..d99c0a195 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/InstrumentApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/InstrumentApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -29,9 +29,10 @@ object InstrumentApi { * code 200 : Seq[Instrument] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -41,7 +42,7 @@ object InstrumentApi { * @param endTime Ending date filter for results. */ def instrument.get(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[Instrument]] = - ApiRequest[Seq[Instrument]](ApiMethods.GET, "https://localhost/api/v1", "/instrument", "application/json") + ApiRequest[Seq[Instrument]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/instrument", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -53,6 +54,7 @@ object InstrumentApi { .withSuccessResponse[Seq[Instrument]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -61,13 +63,15 @@ object InstrumentApi { * code 200 : Seq[Instrument] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def instrument.getActive(): ApiRequest[Seq[Instrument]] = - ApiRequest[Seq[Instrument]](ApiMethods.GET, "https://localhost/api/v1", "/instrument/active", "application/json") + ApiRequest[Seq[Instrument]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/instrument/active", "application/json") .withSuccessResponse[Seq[Instrument]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -76,28 +80,32 @@ object InstrumentApi { * code 200 : Seq[Instrument] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def instrument.getActiveAndIndices(): ApiRequest[Seq[Instrument]] = - ApiRequest[Seq[Instrument]](ApiMethods.GET, "https://localhost/api/v1", "/instrument/activeAndIndices", "application/json") + ApiRequest[Seq[Instrument]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/instrument/activeAndIndices", "application/json") .withSuccessResponse[Seq[Instrument]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** - * This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. + * This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. * * Expected answers: * code 200 : InstrumentInterval (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def instrument.getActiveIntervals(): ApiRequest[InstrumentInterval] = - ApiRequest[InstrumentInterval](ApiMethods.GET, "https://localhost/api/v1", "/instrument/activeIntervals", "application/json") + ApiRequest[InstrumentInterval](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/instrument/activeIntervals", "application/json") .withSuccessResponse[InstrumentInterval](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * Composite indices are built from multiple external price sources. Use this endpoint to get the underlying prices of an index. For example, send a `symbol` of `.XBT` to get the ticks and weights of the constituent exchanges that build the \".XBT\" index. A tick with reference `\"BMI\"` and weight `null` is the composite index tick. @@ -106,9 +114,9 @@ object InstrumentApi { * code 200 : Seq[IndexComposite] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * - * @param account * @param symbol The composite index symbol. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. @@ -118,9 +126,8 @@ object InstrumentApi { * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ - def instrument.getCompositeIndex(account: Option[Double] = None, symbol: Option[String], filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[IndexComposite]] = - ApiRequest[Seq[IndexComposite]](ApiMethods.GET, "https://localhost/api/v1", "/instrument/compositeIndex", "application/json") - .withQueryParam("account", account) + def instrument.getCompositeIndex(symbol: Option[String], filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[IndexComposite]] = + ApiRequest[Seq[IndexComposite]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/instrument/compositeIndex", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -132,6 +139,7 @@ object InstrumentApi { .withSuccessResponse[Seq[IndexComposite]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -140,13 +148,15 @@ object InstrumentApi { * code 200 : Seq[Instrument] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def instrument.getIndices(): ApiRequest[Seq[Instrument]] = - ApiRequest[Seq[Instrument]](ApiMethods.GET, "https://localhost/api/v1", "/instrument/indices", "application/json") + ApiRequest[Seq[Instrument]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/instrument/indices", "application/json") .withSuccessResponse[Seq[Instrument]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/InsuranceApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/InsuranceApi.scala index da2bc43ce..205bd3246 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/InsuranceApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/InsuranceApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -27,9 +27,10 @@ object InsuranceApi { * code 200 : Seq[Insurance] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -39,7 +40,7 @@ object InsuranceApi { * @param endTime Ending date filter for results. */ def insurance.get(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[Insurance]] = - ApiRequest[Seq[Insurance]](ApiMethods.GET, "https://localhost/api/v1", "/insurance", "application/json") + ApiRequest[Seq[Insurance]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/insurance", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -51,6 +52,7 @@ object InsuranceApi { .withSuccessResponse[Seq[Insurance]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/LeaderboardApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/LeaderboardApi.scala index 9866f7da8..cc415f077 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/LeaderboardApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/LeaderboardApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -12,7 +12,7 @@ package io.swagger.client.api import io.swagger.client.model.Error -import io.swagger.client.model.InlineResponse2001 +import io.swagger.client.model.InlineResponse200 import io.swagger.client.model.Leaderboard import io.swagger.client.core._ import io.swagger.client.core.CollectionFormats._ @@ -27,39 +27,43 @@ object LeaderboardApi { * code 200 : Seq[Leaderboard] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * @param method Ranking type. Options: \"notional\", \"ROE\" */ def leaderboard.get(method: Option[String]): ApiRequest[Seq[Leaderboard]] = - ApiRequest[Seq[Leaderboard]](ApiMethods.GET, "https://localhost/api/v1", "/leaderboard", "application/json") + ApiRequest[Seq[Leaderboard]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/leaderboard", "application/json") .withQueryParam("method", method) .withSuccessResponse[Seq[Leaderboard]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * * * Expected answers: - * code 200 : InlineResponse2001 (Request was successful) + * code 200 : InlineResponse200 (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) */ - def leaderboard.getName()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[InlineResponse2001] = - ApiRequest[InlineResponse2001](ApiMethods.GET, "https://localhost/api/v1", "/leaderboard/name", "application/json") + def leaderboard.getName()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[InlineResponse200] = + ApiRequest[InlineResponse200](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/leaderboard/name", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) - .withSuccessResponse[InlineResponse2001](200) + .withSuccessResponse[InlineResponse200](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/LiquidationApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/LiquidationApi.scala index 93ae9b3ed..94bada902 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/LiquidationApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/LiquidationApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -27,9 +27,10 @@ object LiquidationApi { * code 200 : Seq[Liquidation] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -39,7 +40,7 @@ object LiquidationApi { * @param endTime Ending date filter for results. */ def liquidation.get(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[Liquidation]] = - ApiRequest[Seq[Liquidation]](ApiMethods.GET, "https://localhost/api/v1", "/liquidation", "application/json") + ApiRequest[Seq[Liquidation]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/liquidation", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -51,6 +52,7 @@ object LiquidationApi { .withSuccessResponse[Seq[Liquidation]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/NotificationApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/NotificationApi.scala deleted file mode 100644 index 6340a8bf6..000000000 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/NotificationApi.scala +++ /dev/null @@ -1,48 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.api - -import io.swagger.client.model.Error -import io.swagger.client.model.Notification -import io.swagger.client.core._ -import io.swagger.client.core.CollectionFormats._ -import io.swagger.client.core.ApiKeyLocations._ - -object NotificationApi { - - /** - * This is an upcoming feature and currently does not return data. - * - * Expected answers: - * code 200 : Seq[Notification] (Request was successful) - * code 400 : Error (Parameter Error) - * code 401 : Error (Unauthorized) - * code 404 : Error (Not Found) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) - */ - def notification.get()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Notification]] = - ApiRequest[Seq[Notification]](ApiMethods.GET, "https://localhost/api/v1", "/notification", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withSuccessResponse[Seq[Notification]](200) - .withErrorResponse[Error](400) - .withErrorResponse[Error](401) - .withErrorResponse[Error](404) - - -} - diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/OrderApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/OrderApi.scala index 39bd12040..b59d9caff 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/OrderApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/OrderApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -21,25 +21,26 @@ import io.swagger.client.core.ApiKeyLocations._ object OrderApi { /** - * Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Use the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts. These fields will round up to the nearest contract. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. + * Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. * * Expected answers: * code 200 : Order (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param orderID Order ID * @param origClOrdID Client Order ID. See POST /order. * @param clOrdID Optional new Client Order ID, requires `origClOrdID`. - * @param simpleOrderQty Optional order quantity in units of the underlying instrument (i.e. Bitcoin). + * @param simpleOrderQty Deprecated: simple orders are not supported after 2018/10/26 * @param orderQty Optional order quantity in units of the instrument (i.e. contracts). - * @param simpleLeavesQty Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. + * @param simpleLeavesQty Deprecated: simple orders are not supported after 2018/10/26 * @param leavesQty Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. * @param price Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param stopPx Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. @@ -47,9 +48,9 @@ object OrderApi { * @param text Optional amend annotation. e.g. 'Adjust skew'. */ def order.amend(orderID: Option[String] = None, origClOrdID: Option[String] = None, clOrdID: Option[String] = None, simpleOrderQty: Option[Double] = None, orderQty: Option[Double] = None, simpleLeavesQty: Option[Double] = None, leavesQty: Option[Double] = None, price: Option[Double] = None, stopPx: Option[Double] = None, pegOffsetValue: Option[Double] = None, text: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Order] = - ApiRequest[Order](ApiMethods.PUT, "https://localhost/api/v1", "/order", "application/json") + ApiRequest[Order](ApiMethods.PUT, "https://www.bitmex.com/api/v1", "/order", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("orderID", orderID) .withFormParam("origClOrdID", origClOrdID) @@ -65,6 +66,7 @@ object OrderApi { .withSuccessResponse[Order](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * Similar to POST /amend, but with multiple orders. `application/json` only. Ratelimited at 10%. @@ -73,24 +75,26 @@ object OrderApi { * code 200 : Seq[Order] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param orders An array of orders. */ def order.amendBulk(orders: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Order]] = - ApiRequest[Seq[Order]](ApiMethods.PUT, "https://localhost/api/v1", "/order/bulk", "application/json") + ApiRequest[Seq[Order]](ApiMethods.PUT, "https://www.bitmex.com/api/v1", "/order/bulk", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("orders", orders) .withSuccessResponse[Seq[Order]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * Either an orderID or a clOrdID must be provided. @@ -99,11 +103,12 @@ object OrderApi { * code 200 : Seq[Order] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param orderID Order ID(s). @@ -111,9 +116,9 @@ object OrderApi { * @param text Optional cancellation annotation. e.g. 'Spread Exceeded'. */ def order.cancel(orderID: Option[String] = None, clOrdID: Option[String] = None, text: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Order]] = - ApiRequest[Seq[Order]](ApiMethods.DELETE, "https://localhost/api/v1", "/order", "application/json") + ApiRequest[Seq[Order]](ApiMethods.DELETE, "https://www.bitmex.com/api/v1", "/order", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("orderID", orderID) .withFormParam("clOrdID", clOrdID) @@ -121,6 +126,7 @@ object OrderApi { .withSuccessResponse[Seq[Order]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -129,11 +135,12 @@ object OrderApi { * code 200 : Seq[Order] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param symbol Optional symbol. If provided, only cancels orders for that symbol. @@ -141,9 +148,9 @@ object OrderApi { * @param text Optional cancellation annotation. e.g. 'Spread Exceeded' */ def order.cancelAll(symbol: Option[String] = None, filter: Option[String] = None, text: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Order]] = - ApiRequest[Seq[Order]](ApiMethods.DELETE, "https://localhost/api/v1", "/order/all", "application/json") + ApiRequest[Seq[Order]](ApiMethods.DELETE, "https://www.bitmex.com/api/v1", "/order/all", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("symbol", symbol) .withFormParam("filter", filter) @@ -151,6 +158,7 @@ object OrderApi { .withSuccessResponse[Seq[Order]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * Useful as a dead-man's switch to ensure your orders are canceled in case of an outage. If called repeatedly, the existing offset will be canceled and a new one will be inserted in its place. Example usage: call this route at 15s intervals with an offset of 60000 (60s). If this route is not called within 60 seconds, all your orders will be automatically canceled. This is also available via [WebSocket](https://www.bitmex.com/app/wsAPI#Dead-Mans-Switch-Auto-Cancel). @@ -159,24 +167,26 @@ object OrderApi { * code 200 : Any (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param timeout Timeout in ms. Set to 0 to cancel this timer. */ def order.cancelAllAfter(timeout: Double)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Any] = - ApiRequest[Any](ApiMethods.POST, "https://localhost/api/v1", "/order/cancelAllAfter", "application/json") + ApiRequest[Any](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/order/cancelAllAfter", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("timeout", timeout) .withSuccessResponse[Any](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * If no `price` is specified, a market order will be submitted to close the whole of your position. This will also close all other open orders in this symbol. @@ -185,26 +195,28 @@ object OrderApi { * code 200 : Order (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param symbol Symbol of position to close. * @param price Optional limit price. */ def order.closePosition(symbol: String, price: Option[Double] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Order] = - ApiRequest[Order](ApiMethods.POST, "https://localhost/api/v1", "/order/closePosition", "application/json") + ApiRequest[Order](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/order/closePosition", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("symbol", symbol) .withFormParam("price", price) .withSuccessResponse[Order](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * To get open orders only, send {\"open\": true} in the filter param. See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_D_68.html\">the FIX Spec</a> for explanations of these fields. @@ -213,14 +225,15 @@ object OrderApi { * code 200 : Seq[Order] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -230,9 +243,9 @@ object OrderApi { * @param endTime Ending date filter for results. */ def order.getOrders(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Order]] = - ApiRequest[Seq[Order]](ApiMethods.GET, "https://localhost/api/v1", "/order", "application/json") + ApiRequest[Seq[Order]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/order", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) @@ -245,42 +258,44 @@ object OrderApi { .withSuccessResponse[Seq[Order]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** - * ## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: * **Limit**: The default order type. Specify an `orderQty` and `price`. * **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. * **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as permitted by available margin, will become a limit order. The difference between this type and `Market` only affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining quantity in the books as a `Limit`. * **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. * `Close` Stops don't require an `orderQty`. See Execution Instructions below. * **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. * **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. * **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). * **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. * **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill. * **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. * **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first. * **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. Please follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing. BitMEX offers four advanced Linked Order types: * **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique. Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`. * **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes. * **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended down by the execution quantity. * **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally by the fill percentage. #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities Send a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency. This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is. #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` + * ## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: - **Limit**: The default order type. Specify an `orderQty` and `price`. - **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. - **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. - `Close` Stops don't require an `orderQty`. See Execution Instructions below. - **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. - **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. - **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). - **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. - **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. - **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first. - **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders [Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/) #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities [Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/) #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` * * Expected answers: * code 200 : Order (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param symbol Instrument symbol. e.g. 'XBTUSD'. - * @param side Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. - * @param simpleOrderQty Order quantity in units of the underlying instrument (i.e. Bitcoin). + * @param side Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative. + * @param simpleOrderQty Deprecated: simple orders are not supported after 2018/10/26 * @param orderQty Order quantity in units of the instrument (i.e. contracts). * @param price Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param displayQty Optional quantity to display in the book. Use 0 for a fully hidden order. * @param stopPx Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. * @param clOrdID Optional Client Order ID. This clOrdID will come back on the order and any related executions. - * @param clOrdLinkID Optional Client Order Link ID for contingent orders. + * @param clOrdLinkID Deprecated: linked orders are not supported after 2018/11/10. * @param pegOffsetValue Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. * @param pegPriceType Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. - * @param ordType Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. - * @param timeInForce Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. + * @param ordType Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. + * @param timeInForce Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param execInst Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. - * @param contingencyType Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. + * @param contingencyType Deprecated: linked orders are not supported after 2018/11/10. * @param text Optional order annotation. e.g. 'Take profit'. */ def order.new(symbol: String, side: Option[String] = None, simpleOrderQty: Option[Double] = None, orderQty: Option[Double] = None, price: Option[Double] = None, displayQty: Option[Double] = None, stopPx: Option[Double] = None, clOrdID: Option[String] = None, clOrdLinkID: Option[String] = None, pegOffsetValue: Option[Double] = None, pegPriceType: Option[String] = None, ordType: Option[String], timeInForce: Option[String] = None, execInst: Option[String] = None, contingencyType: Option[String] = None, text: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Order] = - ApiRequest[Order](ApiMethods.POST, "https://localhost/api/v1", "/order", "application/json") + ApiRequest[Order](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/order", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("symbol", symbol) .withFormParam("side", side) @@ -301,32 +316,35 @@ object OrderApi { .withSuccessResponse[Order](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** - * This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. + * This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. * * Expected answers: * code 200 : Seq[Order] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param orders An array of orders. */ def order.newBulk(orders: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Order]] = - ApiRequest[Seq[Order]](ApiMethods.POST, "https://localhost/api/v1", "/order/bulk", "application/json") + ApiRequest[Seq[Order]](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/order/bulk", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("orders", orders) .withSuccessResponse[Seq[Order]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/OrderBookApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/OrderBookApi.scala index 32585f7ba..782b41a8c 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/OrderBookApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/OrderBookApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -26,18 +26,20 @@ object OrderBookApi { * code 200 : Seq[OrderBookL2] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * @param symbol Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series. * @param depth Orderbook depth per side. Send 0 for full depth. */ def orderBook.getL2(symbol: String, depth: Option[Double]): ApiRequest[Seq[OrderBookL2]] = - ApiRequest[Seq[OrderBookL2]](ApiMethods.GET, "https://localhost/api/v1", "/orderBook/L2", "application/json") + ApiRequest[Seq[OrderBookL2]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/orderBook/L2", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("depth", depth) .withSuccessResponse[Seq[OrderBookL2]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/PositionApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/PositionApi.scala index c83ea3ba6..69337416b 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/PositionApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/PositionApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -20,17 +20,18 @@ import io.swagger.client.core.ApiKeyLocations._ object PositionApi { /** - * See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html\">the FIX Spec</a> for explanations of these fields. + * This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below. The fields _account_, _symbol_, _currency_ are unique to each position and form its key. - **account**: Your unique account ID. - **symbol**: The contract for this position. - **currency**: The margin currency for this position. - **underlying**: Meta data of the _symbol_. - **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_ - **commission**: The maximum of the maker, taker, and settlement fee. - **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage. - **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit. - **riskLimit**: This is a function of your _maintMarginReq_. - **leverage**: 1 / initMarginReq. - **crossMargin**: True/false depending on whether you set cross margin on this position. - **deleveragePercentile**: Indicates where your position is in the ADL queue. - **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position. - **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed. - **currentQty**: The current position amount in contracts. - **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_). - **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_). - **realisedCost**: The realised cost of this position calculated with regard to average cost accounting. - **unrealisedCost**: _currentCost_ - _realisedCost_. - **grossOpenCost**: The absolute value of your open orders for this symbol. - **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_). - **markPrice**: The mark price of the symbol in _quoteCurrency_. - **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_). - **homeNotional**: Value of position in units of _underlying_. - **foreignNotional**: Value of position in units of _quoteCurrency_. - **realisedPnl**: The negative of _realisedCost_. - **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_. - **unrealisedPnl**: _unrealisedGrossPnl_. - **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated. - **bankruptPrice**: Once markPrice reaches this price, this position will have no equity. * * Expected answers: * code 200 : Seq[Position] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param filter Table filter. For example, send {\"symbol\": \"XBTUSD\"}. @@ -38,9 +39,9 @@ object PositionApi { * @param count Number of rows to fetch. */ def position.get(filter: Option[String] = None, columns: Option[String] = None, count: Option[Double] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Position]] = - ApiRequest[Seq[Position]](ApiMethods.GET, "https://localhost/api/v1", "/position", "application/json") + ApiRequest[Seq[Position]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/position", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -48,6 +49,7 @@ object PositionApi { .withSuccessResponse[Seq[Position]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -56,26 +58,28 @@ object PositionApi { * code 200 : Position (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param symbol Position symbol to isolate. * @param enabled True for isolated margin, false for cross margin. */ def position.isolateMargin(symbol: String, enabled: Option[Boolean])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Position] = - ApiRequest[Position](ApiMethods.POST, "https://localhost/api/v1", "/position/isolate", "application/json") + ApiRequest[Position](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/position/isolate", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("symbol", symbol) .withFormParam("enabled", enabled) .withSuccessResponse[Position](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -84,26 +88,28 @@ object PositionApi { * code 200 : Position (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param symbol Symbol of position to isolate. * @param amount Amount to transfer, in Satoshis. May be negative. */ def position.transferIsolatedMargin(symbol: String, amount: Double)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Position] = - ApiRequest[Position](ApiMethods.POST, "https://localhost/api/v1", "/position/transferMargin", "application/json") + ApiRequest[Position](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/position/transferMargin", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("symbol", symbol) .withFormParam("amount", amount) .withSuccessResponse[Position](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -112,26 +118,28 @@ object PositionApi { * code 200 : Position (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param symbol Symbol of position to adjust. * @param leverage Leverage value. Send a number between 0.01 and 100 to enable isolated margin with a fixed leverage. Send 0 to enable cross margin. */ def position.updateLeverage(symbol: String, leverage: Double)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Position] = - ApiRequest[Position](ApiMethods.POST, "https://localhost/api/v1", "/position/leverage", "application/json") + ApiRequest[Position](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/position/leverage", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("symbol", symbol) .withFormParam("leverage", leverage) .withSuccessResponse[Position](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -140,26 +148,28 @@ object PositionApi { * code 200 : Position (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param symbol Symbol of position to update risk limit on. * @param riskLimit New Risk Limit, in Satoshis. */ def position.updateRiskLimit(symbol: String, riskLimit: Double)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Position] = - ApiRequest[Position](ApiMethods.POST, "https://localhost/api/v1", "/position/riskLimit", "application/json") + ApiRequest[Position](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/position/riskLimit", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("symbol", symbol) .withFormParam("riskLimit", riskLimit) .withSuccessResponse[Position](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/QuoteApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/QuoteApi.scala index a8fcc233c..1ad42ff36 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/QuoteApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/QuoteApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -27,9 +27,10 @@ object QuoteApi { * code 200 : Seq[Quote] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -39,7 +40,7 @@ object QuoteApi { * @param endTime Ending date filter for results. */ def quote.get(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[Quote]] = - ApiRequest[Seq[Quote]](ApiMethods.GET, "https://localhost/api/v1", "/quote", "application/json") + ApiRequest[Seq[Quote]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/quote", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -51,19 +52,21 @@ object QuoteApi { .withSuccessResponse[Seq[Quote]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** - * + * Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. * * Expected answers: * code 200 : Seq[Quote] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * @param binSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. * @param partial If true, will send in-progress (incomplete) bins for the current time period. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -73,7 +76,7 @@ object QuoteApi { * @param endTime Ending date filter for results. */ def quote.getBucketed(binSize: Option[String], partial: Option[Boolean], symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[Quote]] = - ApiRequest[Seq[Quote]](ApiMethods.GET, "https://localhost/api/v1", "/quote/bucketed", "application/json") + ApiRequest[Seq[Quote]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/quote/bucketed", "application/json") .withQueryParam("binSize", binSize) .withQueryParam("partial", partial) .withQueryParam("symbol", symbol) @@ -87,6 +90,7 @@ object QuoteApi { .withSuccessResponse[Seq[Quote]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/SchemaApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/SchemaApi.scala index 75408a6ec..ea517fbcc 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/SchemaApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/SchemaApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -25,16 +25,18 @@ object SchemaApi { * code 200 : Any (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * @param model Optional model filter. If omitted, will return all models. */ def schema.get(model: Option[String] = None): ApiRequest[Any] = - ApiRequest[Any](ApiMethods.GET, "https://localhost/api/v1", "/schema", "application/json") + ApiRequest[Any](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/schema", "application/json") .withQueryParam("model", model) .withSuccessResponse[Any](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -43,13 +45,15 @@ object SchemaApi { * code 200 : Any (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def schema.websocketHelp(): ApiRequest[Any] = - ApiRequest[Any](ApiMethods.GET, "https://localhost/api/v1", "/schema/websocketHelp", "application/json") + ApiRequest[Any](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/schema/websocketHelp", "application/json") .withSuccessResponse[Any](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/SettlementApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/SettlementApi.scala index 65ce5f803..a32c9a4d7 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/SettlementApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/SettlementApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -27,9 +27,10 @@ object SettlementApi { * code 200 : Seq[Settlement] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -39,7 +40,7 @@ object SettlementApi { * @param endTime Ending date filter for results. */ def settlement.get(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[Settlement]] = - ApiRequest[Seq[Settlement]](ApiMethods.GET, "https://localhost/api/v1", "/settlement", "application/json") + ApiRequest[Seq[Settlement]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/settlement", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -51,6 +52,7 @@ object SettlementApi { .withSuccessResponse[Seq[Settlement]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/StatsApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/StatsApi.scala index 20b0bff69..6d3a28792 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/StatsApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/StatsApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -28,13 +28,15 @@ object StatsApi { * code 200 : Seq[Stats] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def stats.get(): ApiRequest[Seq[Stats]] = - ApiRequest[Seq[Stats]](ApiMethods.GET, "https://localhost/api/v1", "/stats", "application/json") + ApiRequest[Seq[Stats]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/stats", "application/json") .withSuccessResponse[Seq[Stats]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -43,13 +45,15 @@ object StatsApi { * code 200 : Seq[StatsHistory] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def stats.history(): ApiRequest[Seq[StatsHistory]] = - ApiRequest[Seq[StatsHistory]](ApiMethods.GET, "https://localhost/api/v1", "/stats/history", "application/json") + ApiRequest[Seq[StatsHistory]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/stats/history", "application/json") .withSuccessResponse[Seq[StatsHistory]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** * @@ -58,13 +62,15 @@ object StatsApi { * code 200 : Seq[StatsUSD] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) */ def stats.historyUSD(): ApiRequest[Seq[StatsUSD]] = - ApiRequest[Seq[StatsUSD]](ApiMethods.GET, "https://localhost/api/v1", "/stats/historyUSD", "application/json") + ApiRequest[Seq[StatsUSD]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/stats/historyUSD", "application/json") .withSuccessResponse[Seq[StatsUSD]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/TradeApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/TradeApi.scala index 15e309d26..7db58477c 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/TradeApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/TradeApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -28,9 +28,10 @@ object TradeApi { * code 200 : Seq[Trade] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -40,7 +41,7 @@ object TradeApi { * @param endTime Ending date filter for results. */ def trade.get(symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[Trade]] = - ApiRequest[Seq[Trade]](ApiMethods.GET, "https://localhost/api/v1", "/trade", "application/json") + ApiRequest[Seq[Trade]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/trade", "application/json") .withQueryParam("symbol", symbol) .withQueryParam("filter", filter) .withQueryParam("columns", columns) @@ -52,19 +53,21 @@ object TradeApi { .withSuccessResponse[Seq[Trade]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) /** - * + * Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. Also note the `open` price is equal to the `close` price of the previous timeframe bucket. * * Expected answers: * code 200 : Seq[TradeBin] (Request was successful) * code 400 : Error (Parameter Error) * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) * code 404 : Error (Not Found) * * @param binSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. * @param partial If true, will send in-progress (incomplete) bins for the current time period. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -74,7 +77,7 @@ object TradeApi { * @param endTime Ending date filter for results. */ def trade.getBucketed(binSize: Option[String], partial: Option[Boolean], symbol: Option[String] = None, filter: Option[String] = None, columns: Option[String] = None, count: Option[Double], start: Option[Double], reverse: Option[Boolean], startTime: Option[DateTime] = None, endTime: Option[DateTime] = None): ApiRequest[Seq[TradeBin]] = - ApiRequest[Seq[TradeBin]](ApiMethods.GET, "https://localhost/api/v1", "/trade/bucketed", "application/json") + ApiRequest[Seq[TradeBin]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/trade/bucketed", "application/json") .withQueryParam("binSize", binSize) .withQueryParam("partial", partial) .withQueryParam("symbol", symbol) @@ -88,6 +91,7 @@ object TradeApi { .withSuccessResponse[Seq[TradeBin]](200) .withErrorResponse[Error](400) .withErrorResponse[Error](401) + .withErrorResponse[Error](403) .withErrorResponse[Error](404) diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/UserApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/UserApi.scala index c5433bde2..d3eaff5ac 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/UserApi.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/UserApi.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -13,10 +13,14 @@ package io.swagger.client.api import io.swagger.client.model.AccessToken import io.swagger.client.model.Affiliate +import io.swagger.client.model.CommunicationToken +import org.joda.time.DateTime +import io.swagger.client.model.Error import io.swagger.client.model.Margin +import io.swagger.client.model.QuoteFillRatio import io.swagger.client.model.Transaction import io.swagger.client.model.User -import io.swagger.client.model.UserCommission +import io.swagger.client.model.UserCommissionsBySymbol import io.swagger.client.model.Wallet import io.swagger.client.core._ import io.swagger.client.core.CollectionFormats._ @@ -29,311 +33,435 @@ object UserApi { * * Expected answers: * code 200 : Transaction (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * @param token */ def user.cancelWithdrawal(token: String): ApiRequest[Transaction] = - ApiRequest[Transaction](ApiMethods.POST, "https://localhost/api/v1", "/user/cancelWithdrawal", "application/json") + ApiRequest[Transaction](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/user/cancelWithdrawal", "application/json") .withFormParam("token", token) .withSuccessResponse[Transaction](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** - * If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404. + * If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid. * * Expected answers: * code 200 : Double (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * @param referralCode */ def user.checkReferralCode(referralCode: Option[String] = None): ApiRequest[Double] = - ApiRequest[Double](ApiMethods.GET, "https://localhost/api/v1", "/user/checkReferralCode", "application/json") + ApiRequest[Double](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/checkReferralCode", "application/json") .withQueryParam("referralCode", referralCode) .withSuccessResponse[Double](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: - * code 200 : AccessToken (Request was successful) - * - * @param token - */ - def user.confirm(token: String): ApiRequest[AccessToken] = - ApiRequest[AccessToken](ApiMethods.POST, "https://localhost/api/v1", "/user/confirmEmail", "application/json") - .withFormParam("token", token) - .withSuccessResponse[AccessToken](200) - /** - * - * - * Expected answers: - * code 200 : Boolean (Request was successful) + * code 200 : Seq[CommunicationToken] (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * - * @param token Token from your selected TFA type. - * @param `type` Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' + * @param token + * @param platformAgent */ - def user.confirmEnableTFA(token: String, `type`: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Boolean] = - ApiRequest[Boolean](ApiMethods.POST, "https://localhost/api/v1", "/user/confirmEnableTFA", "application/json") + def user.communicationToken(token: String, platformAgent: String)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[CommunicationToken]] = + ApiRequest[Seq[CommunicationToken]](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/user/communicationToken", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) - .withFormParam("type", `type`) .withFormParam("token", token) - .withSuccessResponse[Boolean](200) + .withFormParam("platformAgent", platformAgent) + .withSuccessResponse[Seq[CommunicationToken]](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: - * code 200 : Transaction (Request was successful) + * code 200 : AccessToken (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * @param token */ - def user.confirmWithdrawal(token: String): ApiRequest[Transaction] = - ApiRequest[Transaction](ApiMethods.POST, "https://localhost/api/v1", "/user/confirmWithdrawal", "application/json") + def user.confirm(token: String): ApiRequest[AccessToken] = + ApiRequest[AccessToken](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/user/confirmEmail", "application/json") .withFormParam("token", token) - .withSuccessResponse[Transaction](200) + .withSuccessResponse[AccessToken](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: - * code 200 : Boolean (Request was successful) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) + * code 200 : Transaction (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * - * @param token Token from your selected TFA type. - * @param `type` Two-factor auth type. Supported types: 'GA' (Google Authenticator) + * @param token */ - def user.disableTFA(token: String, `type`: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Boolean] = - ApiRequest[Boolean](ApiMethods.POST, "https://localhost/api/v1", "/user/disableTFA", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withFormParam("type", `type`) + def user.confirmWithdrawal(token: String): ApiRequest[Transaction] = + ApiRequest[Transaction](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/user/confirmWithdrawal", "application/json") .withFormParam("token", token) - .withSuccessResponse[Boolean](200) + .withSuccessResponse[Transaction](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : User (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) */ def user.get()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[User] = - ApiRequest[User](ApiMethods.GET, "https://localhost/api/v1", "/user", "application/json") + ApiRequest[User](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withSuccessResponse[User](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : Affiliate (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) */ def user.getAffiliateStatus()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Affiliate] = - ApiRequest[Affiliate](ApiMethods.GET, "https://localhost/api/v1", "/user/affiliateStatus", "application/json") + ApiRequest[Affiliate](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/affiliateStatus", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withSuccessResponse[Affiliate](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: - * code 200 : Seq[UserCommission] (Request was successful) + * code 200 : UserCommissionsBySymbol (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) */ - def user.getCommission()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[UserCommission]] = - ApiRequest[Seq[UserCommission]](ApiMethods.GET, "https://localhost/api/v1", "/user/commission", "application/json") + def user.getCommission()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[UserCommissionsBySymbol] = + ApiRequest[UserCommissionsBySymbol](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/commission", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) - .withSuccessResponse[Seq[UserCommission]](200) + .withSuccessResponse[UserCommissionsBySymbol](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : String (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param currency */ def user.getDepositAddress(currency: Option[String])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[String] = - ApiRequest[String](ApiMethods.GET, "https://localhost/api/v1", "/user/depositAddress", "application/json") + ApiRequest[String](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/depositAddress", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("currency", currency) .withSuccessResponse[String](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) + /** + * + * + * Expected answers: + * code 200 : Any (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) + * + * Available security schemes: + * apiExpires (apiKey) + * apiKey (apiKey) + * apiSignature (apiKey) + * + * @param symbol + * @param timestamp + */ + def user.getExecutionHistory(symbol: String, timestamp: DateTime)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Any] = + ApiRequest[Any](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/executionHistory", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) + .withApiKey(apiKey, "api-key", HEADER) + .withApiKey(apiKey, "api-signature", HEADER) + .withQueryParam("symbol", symbol) + .withQueryParam("timestamp", timestamp) + .withSuccessResponse[Any](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : Margin (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param currency */ def user.getMargin(currency: Option[String])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Margin] = - ApiRequest[Margin](ApiMethods.GET, "https://localhost/api/v1", "/user/margin", "application/json") + ApiRequest[Margin](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/margin", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("currency", currency) .withSuccessResponse[Margin](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) + /** + * + * + * Expected answers: + * code 200 : QuoteFillRatio (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) + * + * Available security schemes: + * apiExpires (apiKey) + * apiKey (apiKey) + * apiSignature (apiKey) + */ + def user.getQuoteFillRatio()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[QuoteFillRatio] = + ApiRequest[QuoteFillRatio](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/quoteFillRatio", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) + .withApiKey(apiKey, "api-key", HEADER) + .withApiKey(apiKey, "api-signature", HEADER) + .withSuccessResponse[QuoteFillRatio](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : Wallet (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param currency */ def user.getWallet(currency: Option[String])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Wallet] = - ApiRequest[Wallet](ApiMethods.GET, "https://localhost/api/v1", "/user/wallet", "application/json") + ApiRequest[Wallet](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/wallet", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("currency", currency) .withSuccessResponse[Wallet](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : Seq[Transaction] (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param currency + * @param count Number of results to fetch. + * @param start Starting point for results. */ - def user.getWalletHistory(currency: Option[String])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Transaction]] = - ApiRequest[Seq[Transaction]](ApiMethods.GET, "https://localhost/api/v1", "/user/walletHistory", "application/json") + def user.getWalletHistory(currency: Option[String], count: Option[Double], start: Option[Double])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Transaction]] = + ApiRequest[Seq[Transaction]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/walletHistory", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("currency", currency) + .withQueryParam("count", count) + .withQueryParam("start", start) .withSuccessResponse[Seq[Transaction]](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : Seq[Transaction] (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param currency */ def user.getWalletSummary(currency: Option[String])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[Transaction]] = - ApiRequest[Seq[Transaction]](ApiMethods.GET, "https://localhost/api/v1", "/user/walletSummary", "application/json") + ApiRequest[Seq[Transaction]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/walletSummary", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withQueryParam("currency", currency) .withSuccessResponse[Seq[Transaction]](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) */ def user.logout(): ApiRequest[Unit] = - ApiRequest[Unit](ApiMethods.POST, "https://localhost/api/v1", "/user/logout", "application/json") + ApiRequest[Unit](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/user/logout", "application/json") .withSuccessResponse[Unit](200) - /** - * - * - * Expected answers: - * code 200 : Double (Request was successful) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) - */ - def user.logoutAll()(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Double] = - ApiRequest[Double](ApiMethods.POST, "https://localhost/api/v1", "/user/logoutAll", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withSuccessResponse[Double](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency. * * Expected answers: * code 200 : Any (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * @param currency */ def user.minWithdrawalFee(currency: Option[String]): ApiRequest[Any] = - ApiRequest[Any](ApiMethods.GET, "https://localhost/api/v1", "/user/minWithdrawalFee", "application/json") + ApiRequest[Any](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/user/minWithdrawalFee", "application/json") .withQueryParam("currency", currency) .withSuccessResponse[Any](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** - * Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled. - * - * Expected answers: - * code 200 : Boolean (Request was successful) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) - * - * @param `type` Two-factor auth type. Supported types: 'GA' (Google Authenticator) - */ - def user.requestEnableTFA(`type`: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Boolean] = - ApiRequest[Boolean](ApiMethods.POST, "https://localhost/api/v1", "/user/requestEnableTFA", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withFormParam("type", `type`) - .withSuccessResponse[Boolean](200) - /** - * This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission. + * This will send a confirmation email to the email address on record. * * Expected answers: * code 200 : Transaction (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param currency Currency you're withdrawing. Options: `XBt` @@ -341,74 +469,54 @@ object UserApi { * @param address Destination Address. * @param otpToken 2FA token. Required if 2FA is enabled on your account. * @param fee Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. + * @param text Optional annotation, e.g. 'Transfer to home wallet'. */ - def user.requestWithdrawal(currency: String, amount: Double, address: String, otpToken: Option[String] = None, fee: Option[Double] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Transaction] = - ApiRequest[Transaction](ApiMethods.POST, "https://localhost/api/v1", "/user/requestWithdrawal", "application/json") + def user.requestWithdrawal(currency: String, amount: Double, address: String, otpToken: Option[String] = None, fee: Option[Double] = None, text: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Transaction] = + ApiRequest[Transaction](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/user/requestWithdrawal", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("otpToken", otpToken) .withFormParam("currency", currency) .withFormParam("amount", amount) .withFormParam("address", address) .withFormParam("fee", fee) + .withFormParam("text", text) .withSuccessResponse[Transaction](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) /** * * * Expected answers: * code 200 : User (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) * * Available security schemes: + * apiExpires (apiKey) * apiKey (apiKey) - * apiNonce (apiKey) * apiSignature (apiKey) * * @param prefs * @param overwrite If true, will overwrite all existing preferences. */ def user.savePreferences(prefs: String, overwrite: Option[Boolean])(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[User] = - ApiRequest[User](ApiMethods.POST, "https://localhost/api/v1", "/user/preferences", "application/json") + ApiRequest[User](ApiMethods.POST, "https://www.bitmex.com/api/v1", "/user/preferences", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) .withApiKey(apiKey, "api-signature", HEADER) .withFormParam("prefs", prefs) .withFormParam("overwrite", overwrite) .withSuccessResponse[User](200) - /** - * - * - * Expected answers: - * code 200 : User (Request was successful) - * - * Available security schemes: - * apiKey (apiKey) - * apiNonce (apiKey) - * apiSignature (apiKey) - * - * @param firstname - * @param lastname - * @param oldPassword - * @param newPassword - * @param newPasswordConfirm - * @param username Username can only be set once. To reset, email support. - * @param country Country of residence. - * @param pgpPubKey PGP Public Key. If specified, automated emails will be sentwith this key. - */ - def user.update(firstname: Option[String] = None, lastname: Option[String] = None, oldPassword: Option[String] = None, newPassword: Option[String] = None, newPasswordConfirm: Option[String] = None, username: Option[String] = None, country: Option[String] = None, pgpPubKey: Option[String] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[User] = - ApiRequest[User](ApiMethods.PUT, "https://localhost/api/v1", "/user", "application/json") - .withApiKey(apiKey, "api-key", HEADER) - .withApiKey(apiKey, "api-nonce", HEADER) - .withApiKey(apiKey, "api-signature", HEADER) - .withFormParam("firstname", firstname) - .withFormParam("lastname", lastname) - .withFormParam("oldPassword", oldPassword) - .withFormParam("newPassword", newPassword) - .withFormParam("newPasswordConfirm", newPasswordConfirm) - .withFormParam("username", username) - .withFormParam("country", country) - .withFormParam("pgpPubKey", pgpPubKey) - .withSuccessResponse[User](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) } diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/UserEventApi.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/UserEventApi.scala new file mode 100644 index 000000000..8e6b97bcc --- /dev/null +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/api/UserEventApi.scala @@ -0,0 +1,55 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.api + +import io.swagger.client.model.Error +import io.swagger.client.model.UserEvent +import io.swagger.client.core._ +import io.swagger.client.core.CollectionFormats._ +import io.swagger.client.core.ApiKeyLocations._ + +object UserEventApi { + + /** + * + * + * Expected answers: + * code 200 : Seq[UserEvent] (Request was successful) + * code 400 : Error (Parameter Error) + * code 401 : Error (Unauthorized) + * code 403 : Error (Access Denied) + * code 404 : Error (Not Found) + * + * Available security schemes: + * apiExpires (apiKey) + * apiKey (apiKey) + * apiSignature (apiKey) + * + * @param count Number of results to fetch. + * @param startId Cursor for pagination. + */ + def userEvent.get(count: Option[Double], startId: Option[Double] = None)(implicit apiKey: ApiKeyValue, apiKey: ApiKeyValue, apiKey: ApiKeyValue): ApiRequest[Seq[UserEvent]] = + ApiRequest[Seq[UserEvent]](ApiMethods.GET, "https://www.bitmex.com/api/v1", "/userEvent", "application/json") + .withApiKey(apiKey, "api-expires", HEADER) + .withApiKey(apiKey, "api-key", HEADER) + .withApiKey(apiKey, "api-signature", HEADER) + .withQueryParam("count", count) + .withQueryParam("startId", startId) + .withSuccessResponse[Seq[UserEvent]](200) + .withErrorResponse[Error](400) + .withErrorResponse[Error](401) + .withErrorResponse[Error](403) + .withErrorResponse[Error](404) + + +} + diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiInvoker.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiInvoker.scala index 83de89ecb..67c305f36 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiInvoker.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiInvoker.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiRequest.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiRequest.scala index 2e8e8bd92..6acf719c2 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiRequest.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiRequest.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiSettings.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiSettings.scala index 3932c153e..3a1927976 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiSettings.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/ApiSettings.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/requests.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/requests.scala index 5d29f3f07..47acf655a 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/requests.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/core/requests.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/APIKey.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/APIKey.scala index 35287fe92..2ad859362 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/APIKey.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/APIKey.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -20,11 +20,11 @@ case class APIKey ( secret: String, name: String, nonce: Double, - cidr: Option[String], - permissions: Option[Seq[XAny]], - enabled: Option[Boolean], + cidr: Option[String] = None, + permissions: Option[Seq[XAny]] = None, + enabled: Option[Boolean] = None, userId: Double, - created: Option[DateTime] + created: Option[DateTime] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/AccessToken.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/AccessToken.scala index 4feb09b45..0a94a5961 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/AccessToken.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/AccessToken.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,9 +18,9 @@ import java.util.UUID case class AccessToken ( id: String, /* time to live in seconds (2 weeks by default) */ - ttl: Option[Double], - created: Option[DateTime], - userId: Option[Double] + ttl: Option[Double] = None, + created: Option[DateTime] = None, + userId: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Affiliate.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Affiliate.scala index 20eb0df78..8ba821a08 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Affiliate.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Affiliate.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,19 +18,21 @@ import java.util.UUID case class Affiliate ( account: Double, currency: String, - prevPayout: Option[Double], - prevTurnover: Option[Double], - prevComm: Option[Double], - prevTimestamp: Option[DateTime], - execTurnover: Option[Double], - execComm: Option[Double], - totalReferrals: Option[Double], - totalTurnover: Option[Double], - totalComm: Option[Double], - payoutPcnt: Option[Double], - pendingPayout: Option[Double], - timestamp: Option[DateTime], - referrerAccount: Option[Double] + prevPayout: Option[Double] = None, + prevTurnover: Option[Double] = None, + prevComm: Option[Double] = None, + prevTimestamp: Option[DateTime] = None, + execTurnover: Option[Double] = None, + execComm: Option[Double] = None, + totalReferrals: Option[Double] = None, + totalTurnover: Option[Double] = None, + totalComm: Option[Double] = None, + payoutPcnt: Option[Double] = None, + pendingPayout: Option[Double] = None, + timestamp: Option[DateTime] = None, + referrerAccount: Option[Double] = None, + referralDiscount: Option[Double] = None, + affiliatePayout: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Announcement.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Announcement.scala index 7c7697e24..e7cce9e03 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Announcement.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Announcement.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,10 +17,10 @@ import java.util.UUID case class Announcement ( id: Double, - link: Option[String], - title: Option[String], - content: Option[String], - date: Option[DateTime] + link: Option[String] = None, + title: Option[String] = None, + content: Option[String] = None, + date: Option[DateTime] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Chat.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Chat.scala index 1af89d9a4..d863aea61 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Chat.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Chat.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -16,13 +16,13 @@ import org.joda.time.DateTime import java.util.UUID case class Chat ( - id: Option[Double], + id: Option[Double] = None, date: DateTime, user: String, message: String, html: String, - fromBot: Option[Boolean], - channelID: Option[Double] + fromBot: Option[Boolean] = None, + channelID: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ChatChannel.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ChatChannel.scala index f435b85f5..e66edbf96 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ChatChannel.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ChatChannel.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -16,7 +16,7 @@ import org.joda.time.DateTime import java.util.UUID case class ChatChannel ( - id: Option[Double], + id: Option[Double] = None, name: String ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/CommunicationToken.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/CommunicationToken.scala new file mode 100644 index 000000000..b673cd8d6 --- /dev/null +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/CommunicationToken.scala @@ -0,0 +1,25 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + +import io.swagger.client.core.ApiModel +import org.joda.time.DateTime +import java.util.UUID + +case class CommunicationToken ( + id: String, + userId: Double, + deviceToken: String, + channel: String +) extends ApiModel + + diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ConnectedUsers.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ConnectedUsers.scala index ed53b7f84..ae7772937 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ConnectedUsers.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ConnectedUsers.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -16,8 +16,8 @@ import org.joda.time.DateTime import java.util.UUID case class ConnectedUsers ( - users: Option[Double], - bots: Option[Double] + users: Option[Double] = None, + bots: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Error.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Error.scala index a98d70f72..3d965819a 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Error.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Error.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ErrorError.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ErrorError.scala index 96dd7bda4..9b30b4651 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ErrorError.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/ErrorError.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -16,8 +16,8 @@ import org.joda.time.DateTime import java.util.UUID case class ErrorError ( - message: Option[String], - name: Option[String] + message: Option[String] = None, + name: Option[String] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Execution.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Execution.scala index a273d3826..d5b41b0c2 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Execution.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Execution.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,52 +17,52 @@ import java.util.UUID case class Execution ( execID: String, - orderID: Option[String], - clOrdID: Option[String], - clOrdLinkID: Option[String], - account: Option[Double], - symbol: Option[String], - side: Option[String], - lastQty: Option[Double], - lastPx: Option[Double], - underlyingLastPx: Option[Double], - lastMkt: Option[String], - lastLiquidityInd: Option[String], - simpleOrderQty: Option[Double], - orderQty: Option[Double], - price: Option[Double], - displayQty: Option[Double], - stopPx: Option[Double], - pegOffsetValue: Option[Double], - pegPriceType: Option[String], - currency: Option[String], - settlCurrency: Option[String], - execType: Option[String], - ordType: Option[String], - timeInForce: Option[String], - execInst: Option[String], - contingencyType: Option[String], - exDestination: Option[String], - ordStatus: Option[String], - triggered: Option[String], - workingIndicator: Option[Boolean], - ordRejReason: Option[String], - simpleLeavesQty: Option[Double], - leavesQty: Option[Double], - simpleCumQty: Option[Double], - cumQty: Option[Double], - avgPx: Option[Double], - commission: Option[Double], - tradePublishIndicator: Option[String], - multiLegReportingType: Option[String], - text: Option[String], - trdMatchID: Option[String], - execCost: Option[Double], - execComm: Option[Double], - homeNotional: Option[Double], - foreignNotional: Option[Double], - transactTime: Option[DateTime], - timestamp: Option[DateTime] + orderID: Option[String] = None, + clOrdID: Option[String] = None, + clOrdLinkID: Option[String] = None, + account: Option[Double] = None, + symbol: Option[String] = None, + side: Option[String] = None, + lastQty: Option[Double] = None, + lastPx: Option[Double] = None, + underlyingLastPx: Option[Double] = None, + lastMkt: Option[String] = None, + lastLiquidityInd: Option[String] = None, + simpleOrderQty: Option[Double] = None, + orderQty: Option[Double] = None, + price: Option[Double] = None, + displayQty: Option[Double] = None, + stopPx: Option[Double] = None, + pegOffsetValue: Option[Double] = None, + pegPriceType: Option[String] = None, + currency: Option[String] = None, + settlCurrency: Option[String] = None, + execType: Option[String] = None, + ordType: Option[String] = None, + timeInForce: Option[String] = None, + execInst: Option[String] = None, + contingencyType: Option[String] = None, + exDestination: Option[String] = None, + ordStatus: Option[String] = None, + triggered: Option[String] = None, + workingIndicator: Option[Boolean] = None, + ordRejReason: Option[String] = None, + simpleLeavesQty: Option[Double] = None, + leavesQty: Option[Double] = None, + simpleCumQty: Option[Double] = None, + cumQty: Option[Double] = None, + avgPx: Option[Double] = None, + commission: Option[Double] = None, + tradePublishIndicator: Option[String] = None, + multiLegReportingType: Option[String] = None, + text: Option[String] = None, + trdMatchID: Option[String] = None, + execCost: Option[Double] = None, + execComm: Option[Double] = None, + homeNotional: Option[Double] = None, + foreignNotional: Option[Double] = None, + transactTime: Option[DateTime] = None, + timestamp: Option[DateTime] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Funding.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Funding.scala index 2dd8bb80c..99b05d9ae 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Funding.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Funding.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,9 +18,9 @@ import java.util.UUID case class Funding ( timestamp: DateTime, symbol: String, - fundingInterval: Option[DateTime], - fundingRate: Option[Double], - fundingRateDaily: Option[Double] + fundingInterval: Option[DateTime] = None, + fundingRate: Option[Double] = None, + fundingRateDaily: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/GlobalNotification.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/GlobalNotification.scala new file mode 100644 index 000000000..38fa212b4 --- /dev/null +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/GlobalNotification.scala @@ -0,0 +1,41 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + +import io.swagger.client.core.ApiModel +import org.joda.time.DateTime +import java.util.UUID + +case class GlobalNotification ( + id: Option[Double] = None, + date: DateTime, + title: String, + body: String, + ttl: Double, + `type`: Option[GlobalNotificationEnums.`Type`] = None, + closable: Option[Boolean] = None, + persist: Option[Boolean] = None, + waitForVisibility: Option[Boolean] = None, + sound: Option[String] = None +) extends ApiModel + +object GlobalNotificationEnums { + + type `Type` = `Type`.Value + object `Type` extends Enumeration { + val Success = Value("success") + val Error = Value("error") + val Info = Value("info") + } + +} + diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/IndexComposite.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/IndexComposite.scala index f851c61ba..7a176c089 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/IndexComposite.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/IndexComposite.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,12 +17,12 @@ import java.util.UUID case class IndexComposite ( timestamp: DateTime, - symbol: Option[String], - indexSymbol: Option[String], - reference: Option[String], - lastPrice: Option[Double], - weight: Option[Double], - logged: Option[DateTime] + symbol: Option[String] = None, + indexSymbol: Option[String] = None, + reference: Option[String] = None, + lastPrice: Option[Double] = None, + weight: Option[Double] = None, + logged: Option[DateTime] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala index 47ac274a9..a27b10cdc 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -16,7 +16,7 @@ import org.joda.time.DateTime import java.util.UUID case class InlineResponse200 ( - success: Option[Boolean] + name: Option[String] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InlineResponse2001.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InlineResponse2001.scala deleted file mode 100644 index 79bbb67fe..000000000 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InlineResponse2001.scala +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - -import io.swagger.client.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID - -case class InlineResponse2001 ( - name: Option[String] -) extends ApiModel - - diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Instrument.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Instrument.scala index 1fc47db2c..f1e525286 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Instrument.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Instrument.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,106 +17,108 @@ import java.util.UUID case class Instrument ( symbol: String, - rootSymbol: Option[String], - state: Option[String], - typ: Option[String], - listing: Option[DateTime], - front: Option[DateTime], - expiry: Option[DateTime], - settle: Option[DateTime], - relistInterval: Option[DateTime], - inverseLeg: Option[String], - sellLeg: Option[String], - buyLeg: Option[String], - optionStrikePcnt: Option[Double], - optionStrikeRound: Option[Double], - optionStrikePrice: Option[Double], - optionMultiplier: Option[Double], - positionCurrency: Option[String], - underlying: Option[String], - quoteCurrency: Option[String], - underlyingSymbol: Option[String], - reference: Option[String], - referenceSymbol: Option[String], - calcInterval: Option[DateTime], - publishInterval: Option[DateTime], - publishTime: Option[DateTime], - maxOrderQty: Option[Double], - maxPrice: Option[Double], - lotSize: Option[Double], - tickSize: Option[Double], - multiplier: Option[Double], - settlCurrency: Option[String], - underlyingToPositionMultiplier: Option[Double], - underlyingToSettleMultiplier: Option[Double], - quoteToSettleMultiplier: Option[Double], - isQuanto: Option[Boolean], - isInverse: Option[Boolean], - initMargin: Option[Double], - maintMargin: Option[Double], - riskLimit: Option[Double], - riskStep: Option[Double], - limit: Option[Double], - capped: Option[Boolean], - taxed: Option[Boolean], - deleverage: Option[Boolean], - makerFee: Option[Double], - takerFee: Option[Double], - settlementFee: Option[Double], - insuranceFee: Option[Double], - fundingBaseSymbol: Option[String], - fundingQuoteSymbol: Option[String], - fundingPremiumSymbol: Option[String], - fundingTimestamp: Option[DateTime], - fundingInterval: Option[DateTime], - fundingRate: Option[Double], - indicativeFundingRate: Option[Double], - rebalanceTimestamp: Option[DateTime], - rebalanceInterval: Option[DateTime], - openingTimestamp: Option[DateTime], - closingTimestamp: Option[DateTime], - sessionInterval: Option[DateTime], - prevClosePrice: Option[Double], - limitDownPrice: Option[Double], - limitUpPrice: Option[Double], - bankruptLimitDownPrice: Option[Double], - bankruptLimitUpPrice: Option[Double], - prevTotalVolume: Option[Double], - totalVolume: Option[Double], - volume: Option[Double], - volume24h: Option[Double], - prevTotalTurnover: Option[Double], - totalTurnover: Option[Double], - turnover: Option[Double], - turnover24h: Option[Double], - prevPrice24h: Option[Double], - vwap: Option[Double], - highPrice: Option[Double], - lowPrice: Option[Double], - lastPrice: Option[Double], - lastPriceProtected: Option[Double], - lastTickDirection: Option[String], - lastChangePcnt: Option[Double], - bidPrice: Option[Double], - midPrice: Option[Double], - askPrice: Option[Double], - impactBidPrice: Option[Double], - impactMidPrice: Option[Double], - impactAskPrice: Option[Double], - hasLiquidity: Option[Boolean], - openInterest: Option[Double], - openValue: Option[Double], - fairMethod: Option[String], - fairBasisRate: Option[Double], - fairBasis: Option[Double], - fairPrice: Option[Double], - markMethod: Option[String], - markPrice: Option[Double], - indicativeTaxRate: Option[Double], - indicativeSettlePrice: Option[Double], - optionUnderlyingPrice: Option[Double], - settledPrice: Option[Double], - timestamp: Option[DateTime] + rootSymbol: Option[String] = None, + state: Option[String] = None, + typ: Option[String] = None, + listing: Option[DateTime] = None, + front: Option[DateTime] = None, + expiry: Option[DateTime] = None, + settle: Option[DateTime] = None, + relistInterval: Option[DateTime] = None, + inverseLeg: Option[String] = None, + sellLeg: Option[String] = None, + buyLeg: Option[String] = None, + optionStrikePcnt: Option[Double] = None, + optionStrikeRound: Option[Double] = None, + optionStrikePrice: Option[Double] = None, + optionMultiplier: Option[Double] = None, + positionCurrency: Option[String] = None, + underlying: Option[String] = None, + quoteCurrency: Option[String] = None, + underlyingSymbol: Option[String] = None, + reference: Option[String] = None, + referenceSymbol: Option[String] = None, + calcInterval: Option[DateTime] = None, + publishInterval: Option[DateTime] = None, + publishTime: Option[DateTime] = None, + maxOrderQty: Option[Double] = None, + maxPrice: Option[Double] = None, + lotSize: Option[Double] = None, + tickSize: Option[Double] = None, + multiplier: Option[Double] = None, + settlCurrency: Option[String] = None, + underlyingToPositionMultiplier: Option[Double] = None, + underlyingToSettleMultiplier: Option[Double] = None, + quoteToSettleMultiplier: Option[Double] = None, + isQuanto: Option[Boolean] = None, + isInverse: Option[Boolean] = None, + initMargin: Option[Double] = None, + maintMargin: Option[Double] = None, + riskLimit: Option[Double] = None, + riskStep: Option[Double] = None, + limit: Option[Double] = None, + capped: Option[Boolean] = None, + taxed: Option[Boolean] = None, + deleverage: Option[Boolean] = None, + makerFee: Option[Double] = None, + takerFee: Option[Double] = None, + settlementFee: Option[Double] = None, + insuranceFee: Option[Double] = None, + fundingBaseSymbol: Option[String] = None, + fundingQuoteSymbol: Option[String] = None, + fundingPremiumSymbol: Option[String] = None, + fundingTimestamp: Option[DateTime] = None, + fundingInterval: Option[DateTime] = None, + fundingRate: Option[Double] = None, + indicativeFundingRate: Option[Double] = None, + rebalanceTimestamp: Option[DateTime] = None, + rebalanceInterval: Option[DateTime] = None, + openingTimestamp: Option[DateTime] = None, + closingTimestamp: Option[DateTime] = None, + sessionInterval: Option[DateTime] = None, + prevClosePrice: Option[Double] = None, + limitDownPrice: Option[Double] = None, + limitUpPrice: Option[Double] = None, + bankruptLimitDownPrice: Option[Double] = None, + bankruptLimitUpPrice: Option[Double] = None, + prevTotalVolume: Option[Double] = None, + totalVolume: Option[Double] = None, + volume: Option[Double] = None, + volume24h: Option[Double] = None, + prevTotalTurnover: Option[Double] = None, + totalTurnover: Option[Double] = None, + turnover: Option[Double] = None, + turnover24h: Option[Double] = None, + homeNotional24h: Option[Double] = None, + foreignNotional24h: Option[Double] = None, + prevPrice24h: Option[Double] = None, + vwap: Option[Double] = None, + highPrice: Option[Double] = None, + lowPrice: Option[Double] = None, + lastPrice: Option[Double] = None, + lastPriceProtected: Option[Double] = None, + lastTickDirection: Option[String] = None, + lastChangePcnt: Option[Double] = None, + bidPrice: Option[Double] = None, + midPrice: Option[Double] = None, + askPrice: Option[Double] = None, + impactBidPrice: Option[Double] = None, + impactMidPrice: Option[Double] = None, + impactAskPrice: Option[Double] = None, + hasLiquidity: Option[Boolean] = None, + openInterest: Option[Double] = None, + openValue: Option[Double] = None, + fairMethod: Option[String] = None, + fairBasisRate: Option[Double] = None, + fairBasis: Option[Double] = None, + fairPrice: Option[Double] = None, + markMethod: Option[String] = None, + markPrice: Option[Double] = None, + indicativeTaxRate: Option[Double] = None, + indicativeSettlePrice: Option[Double] = None, + optionUnderlyingPrice: Option[Double] = None, + settledPrice: Option[Double] = None, + timestamp: Option[DateTime] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InstrumentInterval.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InstrumentInterval.scala index 3c5c4193f..4294ed5ad 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InstrumentInterval.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/InstrumentInterval.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Insurance.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Insurance.scala index edc08adaa..b2f576dd2 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Insurance.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Insurance.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,7 +18,7 @@ import java.util.UUID case class Insurance ( currency: String, timestamp: DateTime, - walletBalance: Option[Double] + walletBalance: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Leaderboard.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Leaderboard.scala index 088c8613d..6ac57bc19 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Leaderboard.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Leaderboard.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,8 +17,8 @@ import java.util.UUID case class Leaderboard ( name: String, - isRealName: Option[Boolean], - profit: Option[Double] + isRealName: Option[Boolean] = None, + profit: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Liquidation.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Liquidation.scala index 1f64aafda..3223b1171 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Liquidation.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Liquidation.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,10 +17,10 @@ import java.util.UUID case class Liquidation ( orderID: String, - symbol: Option[String], - side: Option[String], - price: Option[Double], - leavesQty: Option[Double] + symbol: Option[String] = None, + side: Option[String] = None, + price: Option[Double] = None, + leavesQty: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Margin.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Margin.scala index e8f74c23c..9c2372cfc 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Margin.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Margin.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,45 +18,45 @@ import java.util.UUID case class Margin ( account: Double, currency: String, - riskLimit: Option[Double], - prevState: Option[String], - state: Option[String], - action: Option[String], - amount: Option[Double], - pendingCredit: Option[Double], - pendingDebit: Option[Double], - confirmedDebit: Option[Double], - prevRealisedPnl: Option[Double], - prevUnrealisedPnl: Option[Double], - grossComm: Option[Double], - grossOpenCost: Option[Double], - grossOpenPremium: Option[Double], - grossExecCost: Option[Double], - grossMarkValue: Option[Double], - riskValue: Option[Double], - taxableMargin: Option[Double], - initMargin: Option[Double], - maintMargin: Option[Double], - sessionMargin: Option[Double], - targetExcessMargin: Option[Double], - varMargin: Option[Double], - realisedPnl: Option[Double], - unrealisedPnl: Option[Double], - indicativeTax: Option[Double], - unrealisedProfit: Option[Double], - syntheticMargin: Option[Double], - walletBalance: Option[Double], - marginBalance: Option[Double], - marginBalancePcnt: Option[Double], - marginLeverage: Option[Double], - marginUsedPcnt: Option[Double], - excessMargin: Option[Double], - excessMarginPcnt: Option[Double], - availableMargin: Option[Double], - withdrawableMargin: Option[Double], - timestamp: Option[DateTime], - grossLastValue: Option[Double], - commission: Option[Double] + riskLimit: Option[Double] = None, + prevState: Option[String] = None, + state: Option[String] = None, + action: Option[String] = None, + amount: Option[Double] = None, + pendingCredit: Option[Double] = None, + pendingDebit: Option[Double] = None, + confirmedDebit: Option[Double] = None, + prevRealisedPnl: Option[Double] = None, + prevUnrealisedPnl: Option[Double] = None, + grossComm: Option[Double] = None, + grossOpenCost: Option[Double] = None, + grossOpenPremium: Option[Double] = None, + grossExecCost: Option[Double] = None, + grossMarkValue: Option[Double] = None, + riskValue: Option[Double] = None, + taxableMargin: Option[Double] = None, + initMargin: Option[Double] = None, + maintMargin: Option[Double] = None, + sessionMargin: Option[Double] = None, + targetExcessMargin: Option[Double] = None, + varMargin: Option[Double] = None, + realisedPnl: Option[Double] = None, + unrealisedPnl: Option[Double] = None, + indicativeTax: Option[Double] = None, + unrealisedProfit: Option[Double] = None, + syntheticMargin: Option[Double] = None, + walletBalance: Option[Double] = None, + marginBalance: Option[Double] = None, + marginBalancePcnt: Option[Double] = None, + marginLeverage: Option[Double] = None, + marginUsedPcnt: Option[Double] = None, + excessMargin: Option[Double] = None, + excessMarginPcnt: Option[Double] = None, + availableMargin: Option[Double] = None, + withdrawableMargin: Option[Double] = None, + timestamp: Option[DateTime] = None, + grossLastValue: Option[Double] = None, + commission: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Notification.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Notification.scala deleted file mode 100644 index edeca0662..000000000 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Notification.scala +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - -import io.swagger.client.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID - -case class Notification ( - id: Option[Double], - date: DateTime, - title: String, - body: String, - ttl: Double, - `type`: Option[NotificationEnums.`Type`], - closable: Option[Boolean], - persist: Option[Boolean], - waitForVisibility: Option[Boolean], - sound: Option[String] -) extends ApiModel - -object NotificationEnums { - - type `Type` = `Type`.Value - object `Type` extends Enumeration { - val Success = Value("success") - val Error = Value("error") - val Info = Value("info") - } - -} - diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Order.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Order.scala index 592d96cff..c4d386043 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Order.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Order.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,38 +17,38 @@ import java.util.UUID case class Order ( orderID: String, - clOrdID: Option[String], - clOrdLinkID: Option[String], - account: Option[Double], - symbol: Option[String], - side: Option[String], - simpleOrderQty: Option[Double], - orderQty: Option[Double], - price: Option[Double], - displayQty: Option[Double], - stopPx: Option[Double], - pegOffsetValue: Option[Double], - pegPriceType: Option[String], - currency: Option[String], - settlCurrency: Option[String], - ordType: Option[String], - timeInForce: Option[String], - execInst: Option[String], - contingencyType: Option[String], - exDestination: Option[String], - ordStatus: Option[String], - triggered: Option[String], - workingIndicator: Option[Boolean], - ordRejReason: Option[String], - simpleLeavesQty: Option[Double], - leavesQty: Option[Double], - simpleCumQty: Option[Double], - cumQty: Option[Double], - avgPx: Option[Double], - multiLegReportingType: Option[String], - text: Option[String], - transactTime: Option[DateTime], - timestamp: Option[DateTime] + clOrdID: Option[String] = None, + clOrdLinkID: Option[String] = None, + account: Option[Double] = None, + symbol: Option[String] = None, + side: Option[String] = None, + simpleOrderQty: Option[Double] = None, + orderQty: Option[Double] = None, + price: Option[Double] = None, + displayQty: Option[Double] = None, + stopPx: Option[Double] = None, + pegOffsetValue: Option[Double] = None, + pegPriceType: Option[String] = None, + currency: Option[String] = None, + settlCurrency: Option[String] = None, + ordType: Option[String] = None, + timeInForce: Option[String] = None, + execInst: Option[String] = None, + contingencyType: Option[String] = None, + exDestination: Option[String] = None, + ordStatus: Option[String] = None, + triggered: Option[String] = None, + workingIndicator: Option[Boolean] = None, + ordRejReason: Option[String] = None, + simpleLeavesQty: Option[Double] = None, + leavesQty: Option[Double] = None, + simpleCumQty: Option[Double] = None, + cumQty: Option[Double] = None, + avgPx: Option[Double] = None, + multiLegReportingType: Option[String] = None, + text: Option[String] = None, + transactTime: Option[DateTime] = None, + timestamp: Option[DateTime] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/OrderBookL2.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/OrderBookL2.scala index 3ea8bdc29..e28545375 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/OrderBookL2.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/OrderBookL2.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -19,8 +19,8 @@ case class OrderBookL2 ( symbol: String, id: Double, side: String, - size: Option[Double], - price: Option[Double] + size: Option[Double] = None, + price: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Position.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Position.scala index 67b4bb4b0..22c351ad3 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Position.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Position.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -19,94 +19,94 @@ case class Position ( account: Double, symbol: String, currency: String, - underlying: Option[String], - quoteCurrency: Option[String], - commission: Option[Double], - initMarginReq: Option[Double], - maintMarginReq: Option[Double], - riskLimit: Option[Double], - leverage: Option[Double], - crossMargin: Option[Boolean], - deleveragePercentile: Option[Double], - rebalancedPnl: Option[Double], - prevRealisedPnl: Option[Double], - prevUnrealisedPnl: Option[Double], - prevClosePrice: Option[Double], - openingTimestamp: Option[DateTime], - openingQty: Option[Double], - openingCost: Option[Double], - openingComm: Option[Double], - openOrderBuyQty: Option[Double], - openOrderBuyCost: Option[Double], - openOrderBuyPremium: Option[Double], - openOrderSellQty: Option[Double], - openOrderSellCost: Option[Double], - openOrderSellPremium: Option[Double], - execBuyQty: Option[Double], - execBuyCost: Option[Double], - execSellQty: Option[Double], - execSellCost: Option[Double], - execQty: Option[Double], - execCost: Option[Double], - execComm: Option[Double], - currentTimestamp: Option[DateTime], - currentQty: Option[Double], - currentCost: Option[Double], - currentComm: Option[Double], - realisedCost: Option[Double], - unrealisedCost: Option[Double], - grossOpenCost: Option[Double], - grossOpenPremium: Option[Double], - grossExecCost: Option[Double], - isOpen: Option[Boolean], - markPrice: Option[Double], - markValue: Option[Double], - riskValue: Option[Double], - homeNotional: Option[Double], - foreignNotional: Option[Double], - posState: Option[String], - posCost: Option[Double], - posCost2: Option[Double], - posCross: Option[Double], - posInit: Option[Double], - posComm: Option[Double], - posLoss: Option[Double], - posMargin: Option[Double], - posMaint: Option[Double], - posAllowance: Option[Double], - taxableMargin: Option[Double], - initMargin: Option[Double], - maintMargin: Option[Double], - sessionMargin: Option[Double], - targetExcessMargin: Option[Double], - varMargin: Option[Double], - realisedGrossPnl: Option[Double], - realisedTax: Option[Double], - realisedPnl: Option[Double], - unrealisedGrossPnl: Option[Double], - longBankrupt: Option[Double], - shortBankrupt: Option[Double], - taxBase: Option[Double], - indicativeTaxRate: Option[Double], - indicativeTax: Option[Double], - unrealisedTax: Option[Double], - unrealisedPnl: Option[Double], - unrealisedPnlPcnt: Option[Double], - unrealisedRoePcnt: Option[Double], - simpleQty: Option[Double], - simpleCost: Option[Double], - simpleValue: Option[Double], - simplePnl: Option[Double], - simplePnlPcnt: Option[Double], - avgCostPrice: Option[Double], - avgEntryPrice: Option[Double], - breakEvenPrice: Option[Double], - marginCallPrice: Option[Double], - liquidationPrice: Option[Double], - bankruptPrice: Option[Double], - timestamp: Option[DateTime], - lastPrice: Option[Double], - lastValue: Option[Double] + underlying: Option[String] = None, + quoteCurrency: Option[String] = None, + commission: Option[Double] = None, + initMarginReq: Option[Double] = None, + maintMarginReq: Option[Double] = None, + riskLimit: Option[Double] = None, + leverage: Option[Double] = None, + crossMargin: Option[Boolean] = None, + deleveragePercentile: Option[Double] = None, + rebalancedPnl: Option[Double] = None, + prevRealisedPnl: Option[Double] = None, + prevUnrealisedPnl: Option[Double] = None, + prevClosePrice: Option[Double] = None, + openingTimestamp: Option[DateTime] = None, + openingQty: Option[Double] = None, + openingCost: Option[Double] = None, + openingComm: Option[Double] = None, + openOrderBuyQty: Option[Double] = None, + openOrderBuyCost: Option[Double] = None, + openOrderBuyPremium: Option[Double] = None, + openOrderSellQty: Option[Double] = None, + openOrderSellCost: Option[Double] = None, + openOrderSellPremium: Option[Double] = None, + execBuyQty: Option[Double] = None, + execBuyCost: Option[Double] = None, + execSellQty: Option[Double] = None, + execSellCost: Option[Double] = None, + execQty: Option[Double] = None, + execCost: Option[Double] = None, + execComm: Option[Double] = None, + currentTimestamp: Option[DateTime] = None, + currentQty: Option[Double] = None, + currentCost: Option[Double] = None, + currentComm: Option[Double] = None, + realisedCost: Option[Double] = None, + unrealisedCost: Option[Double] = None, + grossOpenCost: Option[Double] = None, + grossOpenPremium: Option[Double] = None, + grossExecCost: Option[Double] = None, + isOpen: Option[Boolean] = None, + markPrice: Option[Double] = None, + markValue: Option[Double] = None, + riskValue: Option[Double] = None, + homeNotional: Option[Double] = None, + foreignNotional: Option[Double] = None, + posState: Option[String] = None, + posCost: Option[Double] = None, + posCost2: Option[Double] = None, + posCross: Option[Double] = None, + posInit: Option[Double] = None, + posComm: Option[Double] = None, + posLoss: Option[Double] = None, + posMargin: Option[Double] = None, + posMaint: Option[Double] = None, + posAllowance: Option[Double] = None, + taxableMargin: Option[Double] = None, + initMargin: Option[Double] = None, + maintMargin: Option[Double] = None, + sessionMargin: Option[Double] = None, + targetExcessMargin: Option[Double] = None, + varMargin: Option[Double] = None, + realisedGrossPnl: Option[Double] = None, + realisedTax: Option[Double] = None, + realisedPnl: Option[Double] = None, + unrealisedGrossPnl: Option[Double] = None, + longBankrupt: Option[Double] = None, + shortBankrupt: Option[Double] = None, + taxBase: Option[Double] = None, + indicativeTaxRate: Option[Double] = None, + indicativeTax: Option[Double] = None, + unrealisedTax: Option[Double] = None, + unrealisedPnl: Option[Double] = None, + unrealisedPnlPcnt: Option[Double] = None, + unrealisedRoePcnt: Option[Double] = None, + simpleQty: Option[Double] = None, + simpleCost: Option[Double] = None, + simpleValue: Option[Double] = None, + simplePnl: Option[Double] = None, + simplePnlPcnt: Option[Double] = None, + avgCostPrice: Option[Double] = None, + avgEntryPrice: Option[Double] = None, + breakEvenPrice: Option[Double] = None, + marginCallPrice: Option[Double] = None, + liquidationPrice: Option[Double] = None, + bankruptPrice: Option[Double] = None, + timestamp: Option[DateTime] = None, + lastPrice: Option[Double] = None, + lastValue: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Quote.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Quote.scala index c00287379..160c0585f 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Quote.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Quote.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,10 +18,10 @@ import java.util.UUID case class Quote ( timestamp: DateTime, symbol: String, - bidSize: Option[Double], - bidPrice: Option[Double], - askPrice: Option[Double], - askSize: Option[Double] + bidSize: Option[Double] = None, + bidPrice: Option[Double] = None, + askPrice: Option[Double] = None, + askSize: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/QuoteFillRatio.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/QuoteFillRatio.scala new file mode 100644 index 000000000..a1f92fb2f --- /dev/null +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/QuoteFillRatio.scala @@ -0,0 +1,28 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + +import io.swagger.client.core.ApiModel +import org.joda.time.DateTime +import java.util.UUID + +case class QuoteFillRatio ( + date: DateTime, + account: Option[Double] = None, + quoteCount: Option[Double] = None, + dealtCount: Option[Double] = None, + quotesMavg7: Option[Double] = None, + dealtMavg7: Option[Double] = None, + quoteFillRatioMavg7: Option[Double] = None +) extends ApiModel + + diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Settlement.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Settlement.scala index 12cff8c40..a8451c6a5 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Settlement.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Settlement.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,13 +18,13 @@ import java.util.UUID case class Settlement ( timestamp: DateTime, symbol: String, - settlementType: Option[String], - settledPrice: Option[Double], - optionStrikePrice: Option[Double], - optionUnderlyingPrice: Option[Double], - bankrupt: Option[Double], - taxBase: Option[Double], - taxRate: Option[Double] + settlementType: Option[String] = None, + settledPrice: Option[Double] = None, + optionStrikePrice: Option[Double] = None, + optionUnderlyingPrice: Option[Double] = None, + bankrupt: Option[Double] = None, + taxBase: Option[Double] = None, + taxRate: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Stats.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Stats.scala index bf90dd1d1..808906ffa 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Stats.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Stats.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,11 +17,11 @@ import java.util.UUID case class Stats ( rootSymbol: String, - currency: Option[String], - volume24h: Option[Double], - turnover24h: Option[Double], - openInterest: Option[Double], - openValue: Option[Double] + currency: Option[String] = None, + volume24h: Option[Double] = None, + turnover24h: Option[Double] = None, + openInterest: Option[Double] = None, + openValue: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/StatsHistory.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/StatsHistory.scala index 12c04d552..d540f50b4 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/StatsHistory.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/StatsHistory.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,9 +18,9 @@ import java.util.UUID case class StatsHistory ( date: DateTime, rootSymbol: String, - currency: Option[String], - volume: Option[Double], - turnover: Option[Double] + currency: Option[String] = None, + volume: Option[Double] = None, + turnover: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/StatsUSD.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/StatsUSD.scala index 768e2e679..7e32ec3ab 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/StatsUSD.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/StatsUSD.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,11 +17,11 @@ import java.util.UUID case class StatsUSD ( rootSymbol: String, - currency: Option[String], - turnover24h: Option[Double], - turnover30d: Option[Double], - turnover365d: Option[Double], - turnover: Option[Double] + currency: Option[String] = None, + turnover24h: Option[Double] = None, + turnover30d: Option[Double] = None, + turnover365d: Option[Double] = None, + turnover: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Trade.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Trade.scala index e5da764c1..c18ff4b9e 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Trade.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Trade.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,14 +18,14 @@ import java.util.UUID case class Trade ( timestamp: DateTime, symbol: String, - side: Option[String], - size: Option[Double], - price: Option[Double], - tickDirection: Option[String], - trdMatchID: Option[String], - grossValue: Option[Double], - homeNotional: Option[Double], - foreignNotional: Option[Double] + side: Option[String] = None, + size: Option[Double] = None, + price: Option[Double] = None, + tickDirection: Option[String] = None, + trdMatchID: Option[String] = None, + grossValue: Option[Double] = None, + homeNotional: Option[Double] = None, + foreignNotional: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/TradeBin.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/TradeBin.scala index 996b5ca32..89fdd8efb 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/TradeBin.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/TradeBin.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,17 +18,17 @@ import java.util.UUID case class TradeBin ( timestamp: DateTime, symbol: String, - open: Option[Double], - high: Option[Double], - low: Option[Double], - close: Option[Double], - trades: Option[Double], - volume: Option[Double], - vwap: Option[Double], - lastSize: Option[Double], - turnover: Option[Double], - homeNotional: Option[Double], - foreignNotional: Option[Double] + open: Option[Double] = None, + high: Option[Double] = None, + low: Option[Double] = None, + close: Option[Double] = None, + trades: Option[Double] = None, + volume: Option[Double] = None, + vwap: Option[Double] = None, + lastSize: Option[Double] = None, + turnover: Option[Double] = None, + homeNotional: Option[Double] = None, + foreignNotional: Option[Double] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Transaction.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Transaction.scala index fdb6c987a..2100647b8 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Transaction.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Transaction.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -17,17 +17,17 @@ import java.util.UUID case class Transaction ( transactID: String, - account: Option[Double], - currency: Option[String], - transactType: Option[String], - amount: Option[Double], - fee: Option[Double], - transactStatus: Option[String], - address: Option[String], - tx: Option[String], - text: Option[String], - transactTime: Option[DateTime], - timestamp: Option[DateTime] + account: Option[Double] = None, + currency: Option[String] = None, + transactType: Option[String] = None, + amount: Option[Double] = None, + fee: Option[Double] = None, + transactStatus: Option[String] = None, + address: Option[String] = None, + tx: Option[String] = None, + text: Option[String] = None, + transactTime: Option[DateTime] = None, + timestamp: Option[DateTime] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/User.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/User.scala index 74e6e0c17..233a9eebd 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/User.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/User.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -16,23 +16,23 @@ import org.joda.time.DateTime import java.util.UUID case class User ( - id: Option[Double], - ownerId: Option[Double], - firstname: Option[String], - lastname: Option[String], + id: Option[Double] = None, + ownerId: Option[Double] = None, + firstname: Option[String] = None, + lastname: Option[String] = None, username: String, email: String, - phone: Option[String], - created: Option[DateTime], - lastUpdated: Option[DateTime], - preferences: Option[UserPreferences], - tFAEnabled: Option[String], - affiliateID: Option[String], - pgpPubKey: Option[String], - country: Option[String], - geoipCountry: Option[String], - geoipRegion: Option[String], - typ: Option[String] + phone: Option[String] = None, + created: Option[DateTime] = None, + lastUpdated: Option[DateTime] = None, + preferences: Option[UserPreferences] = None, + tFAEnabled: Option[String] = None, + affiliateID: Option[String] = None, + pgpPubKey: Option[String] = None, + country: Option[String] = None, + geoipCountry: Option[String] = None, + geoipRegion: Option[String] = None, + typ: Option[String] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserCommission.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserCommission.scala deleted file mode 100644 index 2aad65f35..000000000 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserCommission.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ -package io.swagger.client.model - -import io.swagger.client.core.ApiModel -import org.joda.time.DateTime -import java.util.UUID - -case class UserCommission ( - makerFee: Option[Double], - takerFee: Option[Double], - settlementFee: Option[Double], - maxFee: Option[Double] -) extends ApiModel - - diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserCommissionsBySymbol.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserCommissionsBySymbol.scala new file mode 100644 index 000000000..510a228a9 --- /dev/null +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserCommissionsBySymbol.scala @@ -0,0 +1,21 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + +import io.swagger.client.core.ApiModel +import org.joda.time.DateTime +import java.util.UUID + +case class UserCommissionsBySymbol ( +) extends ApiModel + + diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserEvent.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserEvent.scala new file mode 100644 index 000000000..ae5167c6e --- /dev/null +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserEvent.scala @@ -0,0 +1,70 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + +import io.swagger.client.core.ApiModel +import org.joda.time.DateTime +import java.util.UUID + +case class UserEvent ( + id: Option[Double] = None, + `type`: UserEventEnums.`Type`, + status: UserEventEnums.Status, + userId: Double, + createdById: Double, + ip: Option[String] = None, + geoipCountry: Option[String] = None, + geoipRegion: Option[String] = None, + geoipSubRegion: Option[String] = None, + eventMeta: Option[Any] = None, + created: DateTime +) extends ApiModel + +object UserEventEnums { + + type `Type` = `Type`.Value + type Status = Status.Value + object `Type` extends Enumeration { + val ApiKeyCreated = Value("apiKeyCreated") + val DeleverageExecution = Value("deleverageExecution") + val DepositConfirmed = Value("depositConfirmed") + val DepositPending = Value("depositPending") + val BanZeroVolumeApiUser = Value("banZeroVolumeApiUser") + val LiquidationOrderPlaced = Value("liquidationOrderPlaced") + val Login = Value("login") + val PgpMaskedEmail = Value("pgpMaskedEmail") + val PgpTestEmail = Value("pgpTestEmail") + val PasswordChanged = Value("passwordChanged") + val PositionStateLiquidated = Value("positionStateLiquidated") + val PositionStateWarning = Value("positionStateWarning") + val ResetPasswordConfirmed = Value("resetPasswordConfirmed") + val ResetPasswordRequest = Value("resetPasswordRequest") + val TransferCanceled = Value("transferCanceled") + val TransferCompleted = Value("transferCompleted") + val TransferReceived = Value("transferReceived") + val TransferRequested = Value("transferRequested") + val TwoFactorDisabled = Value("twoFactorDisabled") + val TwoFactorEnabled = Value("twoFactorEnabled") + val WithdrawalCanceled = Value("withdrawalCanceled") + val WithdrawalCompleted = Value("withdrawalCompleted") + val WithdrawalConfirmed = Value("withdrawalConfirmed") + val WithdrawalRequested = Value("withdrawalRequested") + val Verify = Value("verify") + } + + object Status extends Enumeration { + val Success = Value("success") + val Failure = Value("failure") + } + +} + diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserPreferences.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserPreferences.scala index 49c330738..7726a0ffe 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserPreferences.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/UserPreferences.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -16,32 +16,33 @@ import org.joda.time.DateTime import java.util.UUID case class UserPreferences ( - alertOnLiquidations: Option[Boolean], - animationsEnabled: Option[Boolean], - announcementsLastSeen: Option[DateTime], - chatChannelID: Option[Double], - colorTheme: Option[String], - currency: Option[String], - debug: Option[Boolean], - disableEmails: Option[Seq[String]], - hideConfirmDialogs: Option[Seq[String]], - hideConnectionModal: Option[Boolean], - hideFromLeaderboard: Option[Boolean], - hideNameFromLeaderboard: Option[Boolean], - hideNotifications: Option[Seq[String]], - locale: Option[String], - msgsSeen: Option[Seq[String]], - orderBookBinning: Option[Any], - orderBookType: Option[String], - orderClearImmediate: Option[Boolean], - orderControlsPlusMinus: Option[Boolean], - showLocaleNumbers: Option[Boolean], - sounds: Option[Seq[String]], - strictIPCheck: Option[Boolean], - strictTimeout: Option[Boolean], - tickerGroup: Option[String], - tickerPinned: Option[Boolean], - tradeLayout: Option[String] + alertOnLiquidations: Option[Boolean] = None, + animationsEnabled: Option[Boolean] = None, + announcementsLastSeen: Option[DateTime] = None, + chatChannelID: Option[Double] = None, + colorTheme: Option[String] = None, + currency: Option[String] = None, + debug: Option[Boolean] = None, + disableEmails: Option[Seq[String]] = None, + disablePush: Option[Seq[String]] = None, + hideConfirmDialogs: Option[Seq[String]] = None, + hideConnectionModal: Option[Boolean] = None, + hideFromLeaderboard: Option[Boolean] = None, + hideNameFromLeaderboard: Option[Boolean] = None, + hideNotifications: Option[Seq[String]] = None, + locale: Option[String] = None, + msgsSeen: Option[Seq[String]] = None, + orderBookBinning: Option[Any] = None, + orderBookType: Option[String] = None, + orderClearImmediate: Option[Boolean] = None, + orderControlsPlusMinus: Option[Boolean] = None, + showLocaleNumbers: Option[Boolean] = None, + sounds: Option[Seq[String]] = None, + strictIPCheck: Option[Boolean] = None, + strictTimeout: Option[Boolean] = None, + tickerGroup: Option[String] = None, + tickerPinned: Option[Boolean] = None, + tradeLayout: Option[String] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Wallet.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Wallet.scala index bf13968d6..56ebf06f4 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Wallet.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/Wallet.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,29 +18,29 @@ import java.util.UUID case class Wallet ( account: Double, currency: String, - prevDeposited: Option[Double], - prevWithdrawn: Option[Double], - prevTransferIn: Option[Double], - prevTransferOut: Option[Double], - prevAmount: Option[Double], - prevTimestamp: Option[DateTime], - deltaDeposited: Option[Double], - deltaWithdrawn: Option[Double], - deltaTransferIn: Option[Double], - deltaTransferOut: Option[Double], - deltaAmount: Option[Double], - deposited: Option[Double], - withdrawn: Option[Double], - transferIn: Option[Double], - transferOut: Option[Double], - amount: Option[Double], - pendingCredit: Option[Double], - pendingDebit: Option[Double], - confirmedDebit: Option[Double], - timestamp: Option[DateTime], - addr: Option[String], - script: Option[String], - withdrawalLock: Option[Seq[String]] + prevDeposited: Option[Double] = None, + prevWithdrawn: Option[Double] = None, + prevTransferIn: Option[Double] = None, + prevTransferOut: Option[Double] = None, + prevAmount: Option[Double] = None, + prevTimestamp: Option[DateTime] = None, + deltaDeposited: Option[Double] = None, + deltaWithdrawn: Option[Double] = None, + deltaTransferIn: Option[Double] = None, + deltaTransferOut: Option[Double] = None, + deltaAmount: Option[Double] = None, + deposited: Option[Double] = None, + withdrawn: Option[Double] = None, + transferIn: Option[Double] = None, + transferOut: Option[Double] = None, + amount: Option[Double] = None, + pendingCredit: Option[Double] = None, + pendingDebit: Option[Double] = None, + confirmedDebit: Option[Double] = None, + timestamp: Option[DateTime] = None, + addr: Option[String] = None, + script: Option[String] = None, + withdrawalLock: Option[Seq[String]] = None ) extends ApiModel diff --git a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/XAny.scala b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/XAny.scala index f38f6b91f..9884d0602 100644 --- a/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/XAny.scala +++ b/auto-generated/akka-scala/src/main/scala/io/swagger/client/model/XAny.scala @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/.swagger-codegen/VERSION b/auto-generated/android/.swagger-codegen/VERSION index 855ff9501..a4533be7f 100644 --- a/auto-generated/android/.swagger-codegen/VERSION +++ b/auto-generated/android/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +2.4.11-SNAPSHOT \ No newline at end of file diff --git a/auto-generated/android/README.md b/auto-generated/android/README.md index 73842d4f7..b34985772 100644 --- a/auto-generated/android/README.md +++ b/auto-generated/android/README.md @@ -64,12 +64,12 @@ public class APIKeyApiExample { public static void main(String[] args) { APIKeyApi apiInstance = new APIKeyApi(); - String apiKeyID = "apiKeyID_example"; // String | API Key ID (public component). + Boolean reverse = false; // Boolean | If true, will sort results newest first. try { - APIKey result = apiInstance.aPIKeyDisable(apiKeyID); + List result = apiInstance.aPIKeyGet(reverse); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling APIKeyApi#aPIKeyDisable"); + System.err.println("Exception when calling APIKeyApi#aPIKeyGet"); e.printStackTrace(); } } @@ -79,15 +79,11 @@ public class APIKeyApiExample { ## Documentation for API Endpoints -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*APIKeyApi* | [**aPIKeyDisable**](docs/APIKeyApi.md#aPIKeyDisable) | **POST** /apiKey/disable | Disable an API Key. -*APIKeyApi* | [**aPIKeyEnable**](docs/APIKeyApi.md#aPIKeyEnable) | **POST** /apiKey/enable | Enable an API Key. *APIKeyApi* | [**aPIKeyGet**](docs/APIKeyApi.md#aPIKeyGet) | **GET** /apiKey | Get your API Keys. -*APIKeyApi* | [**aPIKeyNew**](docs/APIKeyApi.md#aPIKeyNew) | **POST** /apiKey | Create a new API Key. -*APIKeyApi* | [**aPIKeyRemove**](docs/APIKeyApi.md#aPIKeyRemove) | **DELETE** /apiKey | Remove an API Key. *AnnouncementApi* | [**announcementGet**](docs/AnnouncementApi.md#announcementGet) | **GET** /announcement | Get site announcements. *AnnouncementApi* | [**announcementGetUrgent**](docs/AnnouncementApi.md#announcementGetUrgent) | **GET** /announcement/urgent | Get urgent (banner) announcements. *ChatApi* | [**chatGet**](docs/ChatApi.md#chatGet) | **GET** /chat | Get chat messages. @@ -97,6 +93,7 @@ Class | Method | HTTP request | Description *ExecutionApi* | [**executionGet**](docs/ExecutionApi.md#executionGet) | **GET** /execution | Get all raw executions for your account. *ExecutionApi* | [**executionGetTradeHistory**](docs/ExecutionApi.md#executionGetTradeHistory) | **GET** /execution/tradeHistory | Get all balance-affecting executions. This includes each trade, insurance charge, and settlement. *FundingApi* | [**fundingGet**](docs/FundingApi.md#fundingGet) | **GET** /funding | Get funding history. +*GlobalNotificationApi* | [**globalNotificationGet**](docs/GlobalNotificationApi.md#globalNotificationGet) | **GET** /globalNotification | Get your current GlobalNotifications. *InstrumentApi* | [**instrumentGet**](docs/InstrumentApi.md#instrumentGet) | **GET** /instrument | Get instruments. *InstrumentApi* | [**instrumentGetActive**](docs/InstrumentApi.md#instrumentGetActive) | **GET** /instrument/active | Get all active instruments and instruments that have expired in <24hrs. *InstrumentApi* | [**instrumentGetActiveAndIndices**](docs/InstrumentApi.md#instrumentGetActiveAndIndices) | **GET** /instrument/activeAndIndices | Helper method. Gets all active instruments and all indices. This is a join of the result of /indices and /active. @@ -107,7 +104,6 @@ Class | Method | HTTP request | Description *LeaderboardApi* | [**leaderboardGet**](docs/LeaderboardApi.md#leaderboardGet) | **GET** /leaderboard | Get current leaderboard. *LeaderboardApi* | [**leaderboardGetName**](docs/LeaderboardApi.md#leaderboardGetName) | **GET** /leaderboard/name | Get your alias on the leaderboard. *LiquidationApi* | [**liquidationGet**](docs/LiquidationApi.md#liquidationGet) | **GET** /liquidation | Get liquidation orders. -*NotificationApi* | [**notificationGet**](docs/NotificationApi.md#notificationGet) | **GET** /notification | Get your current notifications. *OrderApi* | [**orderAmend**](docs/OrderApi.md#orderAmend) | **PUT** /order | Amend the quantity or price of an open order. *OrderApi* | [**orderAmendBulk**](docs/OrderApi.md#orderAmendBulk) | **PUT** /order/bulk | Amend multiple orders for the same symbol. *OrderApi* | [**orderCancel**](docs/OrderApi.md#orderCancel) | **DELETE** /order | Cancel order(s). Send multiple order IDs to cancel in bulk. @@ -135,25 +131,24 @@ Class | Method | HTTP request | Description *TradeApi* | [**tradeGetBucketed**](docs/TradeApi.md#tradeGetBucketed) | **GET** /trade/bucketed | Get previous trades in time buckets. *UserApi* | [**userCancelWithdrawal**](docs/UserApi.md#userCancelWithdrawal) | **POST** /user/cancelWithdrawal | Cancel a withdrawal. *UserApi* | [**userCheckReferralCode**](docs/UserApi.md#userCheckReferralCode) | **GET** /user/checkReferralCode | Check if a referral code is valid. +*UserApi* | [**userCommunicationToken**](docs/UserApi.md#userCommunicationToken) | **POST** /user/communicationToken | Register your communication token for mobile clients *UserApi* | [**userConfirm**](docs/UserApi.md#userConfirm) | **POST** /user/confirmEmail | Confirm your email address with a token. -*UserApi* | [**userConfirmEnableTFA**](docs/UserApi.md#userConfirmEnableTFA) | **POST** /user/confirmEnableTFA | Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. *UserApi* | [**userConfirmWithdrawal**](docs/UserApi.md#userConfirmWithdrawal) | **POST** /user/confirmWithdrawal | Confirm a withdrawal. -*UserApi* | [**userDisableTFA**](docs/UserApi.md#userDisableTFA) | **POST** /user/disableTFA | Disable two-factor auth for this account. *UserApi* | [**userGet**](docs/UserApi.md#userGet) | **GET** /user | Get your user model. *UserApi* | [**userGetAffiliateStatus**](docs/UserApi.md#userGetAffiliateStatus) | **GET** /user/affiliateStatus | Get your current affiliate/referral status. *UserApi* | [**userGetCommission**](docs/UserApi.md#userGetCommission) | **GET** /user/commission | Get your account's commission status. *UserApi* | [**userGetDepositAddress**](docs/UserApi.md#userGetDepositAddress) | **GET** /user/depositAddress | Get a deposit address. +*UserApi* | [**userGetExecutionHistory**](docs/UserApi.md#userGetExecutionHistory) | **GET** /user/executionHistory | Get the execution history by day. *UserApi* | [**userGetMargin**](docs/UserApi.md#userGetMargin) | **GET** /user/margin | Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. +*UserApi* | [**userGetQuoteFillRatio**](docs/UserApi.md#userGetQuoteFillRatio) | **GET** /user/quoteFillRatio | Get 7 days worth of Quote Fill Ratio statistics. *UserApi* | [**userGetWallet**](docs/UserApi.md#userGetWallet) | **GET** /user/wallet | Get your current wallet information. *UserApi* | [**userGetWalletHistory**](docs/UserApi.md#userGetWalletHistory) | **GET** /user/walletHistory | Get a history of all of your wallet transactions (deposits, withdrawals, PNL). *UserApi* | [**userGetWalletSummary**](docs/UserApi.md#userGetWalletSummary) | **GET** /user/walletSummary | Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). *UserApi* | [**userLogout**](docs/UserApi.md#userLogout) | **POST** /user/logout | Log out of BitMEX. -*UserApi* | [**userLogoutAll**](docs/UserApi.md#userLogoutAll) | **POST** /user/logoutAll | Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. *UserApi* | [**userMinWithdrawalFee**](docs/UserApi.md#userMinWithdrawalFee) | **GET** /user/minWithdrawalFee | Get the minimum withdrawal fee for a currency. -*UserApi* | [**userRequestEnableTFA**](docs/UserApi.md#userRequestEnableTFA) | **POST** /user/requestEnableTFA | Get secret key for setting up two-factor auth. *UserApi* | [**userRequestWithdrawal**](docs/UserApi.md#userRequestWithdrawal) | **POST** /user/requestWithdrawal | Request a withdrawal to an external wallet. *UserApi* | [**userSavePreferences**](docs/UserApi.md#userSavePreferences) | **POST** /user/preferences | Save user preferences. -*UserApi* | [**userUpdate**](docs/UserApi.md#userUpdate) | **PUT** /user | Update your password, name, and other attributes. +*UserEventApi* | [**userEventGet**](docs/UserEventApi.md#userEventGet) | **GET** /userEvent | Get your user events ## Documentation for Models @@ -164,25 +159,26 @@ Class | Method | HTTP request | Description - [Announcement](docs/Announcement.md) - [Chat](docs/Chat.md) - [ChatChannel](docs/ChatChannel.md) + - [CommunicationToken](docs/CommunicationToken.md) - [ConnectedUsers](docs/ConnectedUsers.md) - [Error](docs/Error.md) - [ErrorError](docs/ErrorError.md) - [Execution](docs/Execution.md) - [Funding](docs/Funding.md) + - [GlobalNotification](docs/GlobalNotification.md) - [IndexComposite](docs/IndexComposite.md) - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2001](docs/InlineResponse2001.md) - [Instrument](docs/Instrument.md) - [InstrumentInterval](docs/InstrumentInterval.md) - [Insurance](docs/Insurance.md) - [Leaderboard](docs/Leaderboard.md) - [Liquidation](docs/Liquidation.md) - [Margin](docs/Margin.md) - - [Notification](docs/Notification.md) - [Order](docs/Order.md) - [OrderBookL2](docs/OrderBookL2.md) - [Position](docs/Position.md) - [Quote](docs/Quote.md) + - [QuoteFillRatio](docs/QuoteFillRatio.md) - [Settlement](docs/Settlement.md) - [Stats](docs/Stats.md) - [StatsHistory](docs/StatsHistory.md) @@ -191,7 +187,8 @@ Class | Method | HTTP request | Description - [TradeBin](docs/TradeBin.md) - [Transaction](docs/Transaction.md) - [User](docs/User.md) - - [UserCommission](docs/UserCommission.md) + - [UserCommissionsBySymbol](docs/UserCommissionsBySymbol.md) + - [UserEvent](docs/UserEvent.md) - [UserPreferences](docs/UserPreferences.md) - [Wallet](docs/Wallet.md) - [XAny](docs/XAny.md) @@ -200,16 +197,16 @@ Class | Method | HTTP request | Description ## Documentation for Authorization Authentication schemes defined for the API: -### apiKey +### apiExpires - **Type**: API key -- **API key parameter name**: api-key +- **API key parameter name**: api-expires - **Location**: HTTP header -### apiNonce +### apiKey - **Type**: API key -- **API key parameter name**: api-nonce +- **API key parameter name**: api-key - **Location**: HTTP header ### apiSignature diff --git a/auto-generated/android/docs/APIKeyApi.md b/auto-generated/android/docs/APIKeyApi.md index 0782d3fb9..78631b78b 100644 --- a/auto-generated/android/docs/APIKeyApi.md +++ b/auto-generated/android/docs/APIKeyApi.md @@ -1,98 +1,12 @@ # APIKeyApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**aPIKeyDisable**](APIKeyApi.md#aPIKeyDisable) | **POST** /apiKey/disable | Disable an API Key. -[**aPIKeyEnable**](APIKeyApi.md#aPIKeyEnable) | **POST** /apiKey/enable | Enable an API Key. [**aPIKeyGet**](APIKeyApi.md#aPIKeyGet) | **GET** /apiKey | Get your API Keys. -[**aPIKeyNew**](APIKeyApi.md#aPIKeyNew) | **POST** /apiKey | Create a new API Key. -[**aPIKeyRemove**](APIKeyApi.md#aPIKeyRemove) | **DELETE** /apiKey | Remove an API Key. - -# **aPIKeyDisable** -> APIKey aPIKeyDisable(apiKeyID) - -Disable an API Key. - -### Example -```java -// Import classes: -//import io.swagger.client.api.APIKeyApi; - -APIKeyApi apiInstance = new APIKeyApi(); -String apiKeyID = "apiKeyID_example"; // String | API Key ID (public component). -try { - APIKey result = apiInstance.aPIKeyDisable(apiKeyID); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling APIKeyApi#aPIKeyDisable"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiKeyID** | **String**| API Key ID (public component). | - -### Return type - -[**APIKey**](APIKey.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - - -# **aPIKeyEnable** -> APIKey aPIKeyEnable(apiKeyID) - -Enable an API Key. - -### Example -```java -// Import classes: -//import io.swagger.client.api.APIKeyApi; - -APIKeyApi apiInstance = new APIKeyApi(); -String apiKeyID = "apiKeyID_example"; // String | API Key ID (public component). -try { - APIKey result = apiInstance.aPIKeyEnable(apiKeyID); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling APIKeyApi#aPIKeyEnable"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiKeyID** | **String**| API Key ID (public component). | - -### Return type - -[**APIKey**](APIKey.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - # **aPIKeyGet** > List<APIKey> aPIKeyGet(reverse) @@ -127,99 +41,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - - -# **aPIKeyNew** -> APIKey aPIKeyNew(name, cidr, permissions, enabled, token) - -Create a new API Key. - -API Keys can only be created via the frontend. - -### Example -```java -// Import classes: -//import io.swagger.client.api.APIKeyApi; - -APIKeyApi apiInstance = new APIKeyApi(); -String name = "name_example"; // String | Key name. This name is for reference only. -String cidr = "cidr_example"; // String | CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. More on CIDR blocks -String permissions = "permissions_example"; // String | Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"]. -Boolean enabled = false; // Boolean | Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. -String token = "token_example"; // String | OTP Token (YubiKey, Google Authenticator) -try { - APIKey result = apiInstance.aPIKeyNew(name, cidr, permissions, enabled, token); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling APIKeyApi#aPIKeyNew"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String**| Key name. This name is for reference only. | [optional] - **cidr** | **String**| CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. <a href=\"http://software77.net/cidr-101.html\">More on CIDR blocks</a> | [optional] - **permissions** | **String**| Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"]. | [optional] - **enabled** | **Boolean**| Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. | [optional] [default to false] - **token** | **String**| OTP Token (YubiKey, Google Authenticator) | [optional] - -### Return type - -[**APIKey**](APIKey.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - - -# **aPIKeyRemove** -> InlineResponse200 aPIKeyRemove(apiKeyID) - -Remove an API Key. - -### Example -```java -// Import classes: -//import io.swagger.client.api.APIKeyApi; - -APIKeyApi apiInstance = new APIKeyApi(); -String apiKeyID = "apiKeyID_example"; // String | API Key ID (public component). -try { - InlineResponse200 result = apiInstance.aPIKeyRemove(apiKeyID); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling APIKeyApi#aPIKeyRemove"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiKeyID** | **String**| API Key ID (public component). | - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/android/docs/Affiliate.md b/auto-generated/android/docs/Affiliate.md index 875d9e0b7..1fdf338c9 100644 --- a/auto-generated/android/docs/Affiliate.md +++ b/auto-generated/android/docs/Affiliate.md @@ -19,6 +19,8 @@ Name | Type | Description | Notes **pendingPayout** | [**BigDecimal**](BigDecimal.md) | | [optional] **timestamp** | [**Date**](Date.md) | | [optional] **referrerAccount** | **Double** | | [optional] +**referralDiscount** | **Double** | | [optional] +**affiliatePayout** | **Double** | | [optional] diff --git a/auto-generated/android/docs/AnnouncementApi.md b/auto-generated/android/docs/AnnouncementApi.md index 755829e0c..1e804324c 100644 --- a/auto-generated/android/docs/AnnouncementApi.md +++ b/auto-generated/android/docs/AnnouncementApi.md @@ -1,6 +1,6 @@ # AnnouncementApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -79,7 +79,7 @@ This endpoint does not need any parameter. ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/android/docs/ChatApi.md b/auto-generated/android/docs/ChatApi.md index c5c16bbfc..2baafb2e3 100644 --- a/auto-generated/android/docs/ChatApi.md +++ b/auto-generated/android/docs/ChatApi.md @@ -1,6 +1,6 @@ # ChatApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -169,7 +169,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/android/docs/CommunicationToken.md b/auto-generated/android/docs/CommunicationToken.md new file mode 100644 index 000000000..e51312d99 --- /dev/null +++ b/auto-generated/android/docs/CommunicationToken.md @@ -0,0 +1,13 @@ + +# CommunicationToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**userId** | [**BigDecimal**](BigDecimal.md) | | +**deviceToken** | **String** | | +**channel** | **String** | | + + + diff --git a/auto-generated/android/docs/ExecutionApi.md b/auto-generated/android/docs/ExecutionApi.md index b2afec2dd..f11c3a7aa 100644 --- a/auto-generated/android/docs/ExecutionApi.md +++ b/auto-generated/android/docs/ExecutionApi.md @@ -1,6 +1,6 @@ # ExecutionApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -22,7 +22,7 @@ This returns all raw transactions, which includes order opening and cancelation, //import io.swagger.client.api.ExecutionApi; ExecutionApi apiInstance = new ExecutionApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -43,7 +43,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] @@ -58,7 +58,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -77,7 +77,7 @@ Get all balance-affecting executions. This includes each trade, insurance charge //import io.swagger.client.api.ExecutionApi; ExecutionApi apiInstance = new ExecutionApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -98,7 +98,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] @@ -113,7 +113,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/android/docs/FundingApi.md b/auto-generated/android/docs/FundingApi.md index 9c4461ba3..fe5f28614 100644 --- a/auto-generated/android/docs/FundingApi.md +++ b/auto-generated/android/docs/FundingApi.md @@ -1,6 +1,6 @@ # FundingApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,7 +19,7 @@ Get funding history. //import io.swagger.client.api.FundingApi; FundingApi apiInstance = new FundingApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -40,7 +40,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/android/docs/Notification.md b/auto-generated/android/docs/GlobalNotification.md similarity index 96% rename from auto-generated/android/docs/Notification.md rename to auto-generated/android/docs/GlobalNotification.md index 828e4a9c0..c14393ea7 100644 --- a/auto-generated/android/docs/Notification.md +++ b/auto-generated/android/docs/GlobalNotification.md @@ -1,5 +1,5 @@ -# Notification +# GlobalNotification ## Properties Name | Type | Description | Notes diff --git a/auto-generated/android/docs/GlobalNotificationApi.md b/auto-generated/android/docs/GlobalNotificationApi.md new file mode 100644 index 000000000..770098855 --- /dev/null +++ b/auto-generated/android/docs/GlobalNotificationApi.md @@ -0,0 +1,48 @@ +# GlobalNotificationApi + +All URIs are relative to *https://www.bitmex.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**globalNotificationGet**](GlobalNotificationApi.md#globalNotificationGet) | **GET** /globalNotification | Get your current GlobalNotifications. + + + +# **globalNotificationGet** +> List<GlobalNotification> globalNotificationGet() + +Get your current GlobalNotifications. + +This is an upcoming feature and currently does not return data. + +### Example +```java +// Import classes: +//import io.swagger.client.api.GlobalNotificationApi; + +GlobalNotificationApi apiInstance = new GlobalNotificationApi(); +try { + List result = apiInstance.globalNotificationGet(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling GlobalNotificationApi#globalNotificationGet"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<GlobalNotification>**](GlobalNotification.md) + +### Authorization + +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded + - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript + diff --git a/auto-generated/android/docs/InlineResponse200.md b/auto-generated/android/docs/InlineResponse200.md index cf34f5ba6..c1e5fefe6 100644 --- a/auto-generated/android/docs/InlineResponse200.md +++ b/auto-generated/android/docs/InlineResponse200.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**success** | **Boolean** | | [optional] +**name** | **String** | | [optional] diff --git a/auto-generated/android/docs/Instrument.md b/auto-generated/android/docs/Instrument.md index aead7643f..6c5909dbd 100644 --- a/auto-generated/android/docs/Instrument.md +++ b/auto-generated/android/docs/Instrument.md @@ -77,6 +77,8 @@ Name | Type | Description | Notes **totalTurnover** | [**BigDecimal**](BigDecimal.md) | | [optional] **turnover** | [**BigDecimal**](BigDecimal.md) | | [optional] **turnover24h** | [**BigDecimal**](BigDecimal.md) | | [optional] +**homeNotional24h** | **Double** | | [optional] +**foreignNotional24h** | **Double** | | [optional] **prevPrice24h** | **Double** | | [optional] **vwap** | **Double** | | [optional] **highPrice** | **Double** | | [optional] diff --git a/auto-generated/android/docs/InstrumentApi.md b/auto-generated/android/docs/InstrumentApi.md index e5b6e6f3d..daf8a69da 100644 --- a/auto-generated/android/docs/InstrumentApi.md +++ b/auto-generated/android/docs/InstrumentApi.md @@ -1,6 +1,6 @@ # InstrumentApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,7 +26,7 @@ This returns all instruments and indices, including those that have settled or a //import io.swagger.client.api.InstrumentApi; InstrumentApi apiInstance = new InstrumentApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -47,7 +47,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] @@ -149,7 +149,7 @@ No authorization required Return all active contract series and interval pairs. -This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. +This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. ### Example ```java @@ -184,7 +184,7 @@ No authorization required # **instrumentGetCompositeIndex** -> List<IndexComposite> instrumentGetCompositeIndex(account, symbol, filter, columns, count, start, reverse, startTime, endTime) +> List<IndexComposite> instrumentGetCompositeIndex(symbol, filter, columns, count, start, reverse, startTime, endTime) Show constituent parts of an index. @@ -196,7 +196,6 @@ Composite indices are built from multiple external price sources. Use this endp //import io.swagger.client.api.InstrumentApi; InstrumentApi apiInstance = new InstrumentApi(); -Double account = 3.4D; // Double | String symbol = ".XBT"; // String | The composite index symbol. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. @@ -206,7 +205,7 @@ Boolean reverse = false; // Boolean | If true, will sort results newest first. Date startTime = new Date(); // Date | Starting date filter for results. Date endTime = new Date(); // Date | Ending date filter for results. try { - List result = apiInstance.instrumentGetCompositeIndex(account, symbol, filter, columns, count, start, reverse, startTime, endTime); + List result = apiInstance.instrumentGetCompositeIndex(symbol, filter, columns, count, start, reverse, startTime, endTime); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling InstrumentApi#instrumentGetCompositeIndex"); @@ -218,7 +217,6 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **account** | **Double**| | [optional] **symbol** | **String**| The composite index symbol. | [optional] [default to .XBT] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] diff --git a/auto-generated/android/docs/InsuranceApi.md b/auto-generated/android/docs/InsuranceApi.md index a81565db1..628686442 100644 --- a/auto-generated/android/docs/InsuranceApi.md +++ b/auto-generated/android/docs/InsuranceApi.md @@ -1,6 +1,6 @@ # InsuranceApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,7 +19,7 @@ Get insurance fund history. //import io.swagger.client.api.InsuranceApi; InsuranceApi apiInstance = new InsuranceApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -40,7 +40,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/android/docs/LeaderboardApi.md b/auto-generated/android/docs/LeaderboardApi.md index dc6215a5e..e88eac175 100644 --- a/auto-generated/android/docs/LeaderboardApi.md +++ b/auto-generated/android/docs/LeaderboardApi.md @@ -1,6 +1,6 @@ # LeaderboardApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -51,7 +51,7 @@ No authorization required # **leaderboardGetName** -> InlineResponse2001 leaderboardGetName() +> InlineResponse200 leaderboardGetName() Get your alias on the leaderboard. @@ -62,7 +62,7 @@ Get your alias on the leaderboard. LeaderboardApi apiInstance = new LeaderboardApi(); try { - InlineResponse2001 result = apiInstance.leaderboardGetName(); + InlineResponse200 result = apiInstance.leaderboardGetName(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LeaderboardApi#leaderboardGetName"); @@ -75,11 +75,11 @@ This endpoint does not need any parameter. ### Return type -[**InlineResponse2001**](InlineResponse2001.md) +[**InlineResponse200**](InlineResponse200.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/android/docs/LiquidationApi.md b/auto-generated/android/docs/LiquidationApi.md index f1e847aca..8abd2a18f 100644 --- a/auto-generated/android/docs/LiquidationApi.md +++ b/auto-generated/android/docs/LiquidationApi.md @@ -1,6 +1,6 @@ # LiquidationApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,7 +19,7 @@ Get liquidation orders. //import io.swagger.client.api.LiquidationApi; LiquidationApi apiInstance = new LiquidationApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -40,7 +40,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/android/docs/NotificationApi.md b/auto-generated/android/docs/NotificationApi.md deleted file mode 100644 index bf2955c6a..000000000 --- a/auto-generated/android/docs/NotificationApi.md +++ /dev/null @@ -1,48 +0,0 @@ -# NotificationApi - -All URIs are relative to *https://localhost/api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**notificationGet**](NotificationApi.md#notificationGet) | **GET** /notification | Get your current notifications. - - - -# **notificationGet** -> List<Notification> notificationGet() - -Get your current notifications. - -This is an upcoming feature and currently does not return data. - -### Example -```java -// Import classes: -//import io.swagger.client.api.NotificationApi; - -NotificationApi apiInstance = new NotificationApi(); -try { - List result = apiInstance.notificationGet(); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling NotificationApi#notificationGet"); - e.printStackTrace(); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List<Notification>**](Notification.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - diff --git a/auto-generated/android/docs/OrderApi.md b/auto-generated/android/docs/OrderApi.md index ca25811b6..bd44b66fe 100644 --- a/auto-generated/android/docs/OrderApi.md +++ b/auto-generated/android/docs/OrderApi.md @@ -1,6 +1,6 @@ # OrderApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -21,7 +21,7 @@ Method | HTTP request | Description Amend the quantity or price of an open order. -Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Use the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts. These fields will round up to the nearest contract. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. +Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. ### Example ```java @@ -32,9 +32,9 @@ OrderApi apiInstance = new OrderApi(); String orderID = "orderID_example"; // String | Order ID String origClOrdID = "origClOrdID_example"; // String | Client Order ID. See POST /order. String clOrdID = "clOrdID_example"; // String | Optional new Client Order ID, requires `origClOrdID`. -Double simpleOrderQty = 3.4D; // Double | Optional order quantity in units of the underlying instrument (i.e. Bitcoin). +Double simpleOrderQty = 3.4D; // Double | Deprecated: simple orders are not supported after 2018/10/26 BigDecimal orderQty = new BigDecimal(); // BigDecimal | Optional order quantity in units of the instrument (i.e. contracts). -Double simpleLeavesQty = 3.4D; // Double | Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. +Double simpleLeavesQty = 3.4D; // Double | Deprecated: simple orders are not supported after 2018/10/26 BigDecimal leavesQty = new BigDecimal(); // BigDecimal | Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. Double price = 3.4D; // Double | Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. Double stopPx = 3.4D; // Double | Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. @@ -56,9 +56,9 @@ Name | Type | Description | Notes **orderID** | **String**| Order ID | [optional] **origClOrdID** | **String**| Client Order ID. See POST /order. | [optional] **clOrdID** | **String**| Optional new Client Order ID, requires `origClOrdID`. | [optional] - **simpleOrderQty** | **Double**| Optional order quantity in units of the underlying instrument (i.e. Bitcoin). | [optional] + **simpleOrderQty** | **Double**| Deprecated: simple orders are not supported after 2018/10/26 | [optional] **orderQty** | **BigDecimal**| Optional order quantity in units of the instrument (i.e. contracts). | [optional] - **simpleLeavesQty** | **Double**| Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. | [optional] + **simpleLeavesQty** | **Double**| Deprecated: simple orders are not supported after 2018/10/26 | [optional] **leavesQty** | **BigDecimal**| Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. | [optional] **price** | **Double**| Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. | [optional] **stopPx** | **Double**| Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. | [optional] @@ -71,7 +71,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -114,7 +114,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -161,7 +161,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -206,7 +206,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -249,7 +249,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -294,7 +294,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -315,7 +315,7 @@ To get open orders only, send {\"open\": true} in the filter param. S //import io.swagger.client.api.OrderApi; OrderApi apiInstance = new OrderApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -336,7 +336,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] @@ -351,7 +351,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -364,7 +364,7 @@ Name | Type | Description | Notes Create a new order. -## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: * **Limit**: The default order type. Specify an `orderQty` and `price`. * **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. * **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as permitted by available margin, will become a limit order. The difference between this type and `Market` only affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining quantity in the books as a `Limit`. * **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. * `Close` Stops don't require an `orderQty`. See Execution Instructions below. * **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. * **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. * **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). * **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. * **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill. * **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. * **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first. * **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. Please follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing. BitMEX offers four advanced Linked Order types: * **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique. Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`. * **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes. * **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended down by the execution quantity. * **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally by the fill percentage. #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities Send a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency. This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is. #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` +## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: - **Limit**: The default order type. Specify an `orderQty` and `price`. - **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. - **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. - `Close` Stops don't require an `orderQty`. See Execution Instructions below. - **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. - **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. - **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). - **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. - **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. - **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first. - **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders [Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/) #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities [Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/) #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` ### Example ```java @@ -373,20 +373,20 @@ Create a new order. OrderApi apiInstance = new OrderApi(); String symbol = "symbol_example"; // String | Instrument symbol. e.g. 'XBTUSD'. -String side = "side_example"; // String | Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. -Double simpleOrderQty = 3.4D; // Double | Order quantity in units of the underlying instrument (i.e. Bitcoin). +String side = "side_example"; // String | Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative. +Double simpleOrderQty = 3.4D; // Double | Deprecated: simple orders are not supported after 2018/10/26 BigDecimal orderQty = new BigDecimal(); // BigDecimal | Order quantity in units of the instrument (i.e. contracts). Double price = 3.4D; // Double | Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. BigDecimal displayQty = new BigDecimal(); // BigDecimal | Optional quantity to display in the book. Use 0 for a fully hidden order. Double stopPx = 3.4D; // Double | Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. String clOrdID = "clOrdID_example"; // String | Optional Client Order ID. This clOrdID will come back on the order and any related executions. -String clOrdLinkID = "clOrdLinkID_example"; // String | Optional Client Order Link ID for contingent orders. +String clOrdLinkID = "clOrdLinkID_example"; // String | Deprecated: linked orders are not supported after 2018/11/10. Double pegOffsetValue = 3.4D; // Double | Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. String pegPriceType = "pegPriceType_example"; // String | Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. -String ordType = "Limit"; // String | Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. -String timeInForce = "timeInForce_example"; // String | Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. +String ordType = "Limit"; // String | Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. +String timeInForce = "timeInForce_example"; // String | Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. String execInst = "execInst_example"; // String | Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. -String contingencyType = "contingencyType_example"; // String | Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. +String contingencyType = "contingencyType_example"; // String | Deprecated: linked orders are not supported after 2018/11/10. String text = "text_example"; // String | Optional order annotation. e.g. 'Take profit'. try { Order result = apiInstance.orderNew(symbol, side, simpleOrderQty, orderQty, price, displayQty, stopPx, clOrdID, clOrdLinkID, pegOffsetValue, pegPriceType, ordType, timeInForce, execInst, contingencyType, text); @@ -402,20 +402,20 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **symbol** | **String**| Instrument symbol. e.g. 'XBTUSD'. | - **side** | **String**| Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. | [optional] - **simpleOrderQty** | **Double**| Order quantity in units of the underlying instrument (i.e. Bitcoin). | [optional] + **side** | **String**| Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative. | [optional] + **simpleOrderQty** | **Double**| Deprecated: simple orders are not supported after 2018/10/26 | [optional] **orderQty** | **BigDecimal**| Order quantity in units of the instrument (i.e. contracts). | [optional] **price** | **Double**| Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. | [optional] **displayQty** | **BigDecimal**| Optional quantity to display in the book. Use 0 for a fully hidden order. | [optional] **stopPx** | **Double**| Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. | [optional] **clOrdID** | **String**| Optional Client Order ID. This clOrdID will come back on the order and any related executions. | [optional] - **clOrdLinkID** | **String**| Optional Client Order Link ID for contingent orders. | [optional] + **clOrdLinkID** | **String**| Deprecated: linked orders are not supported after 2018/11/10. | [optional] **pegOffsetValue** | **Double**| Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. | [optional] **pegPriceType** | **String**| Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. | [optional] - **ordType** | **String**| Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. | [optional] [default to Limit] - **timeInForce** | **String**| Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. | [optional] + **ordType** | **String**| Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. | [optional] [default to Limit] + **timeInForce** | **String**| Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. | [optional] **execInst** | **String**| Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. | [optional] - **contingencyType** | **String**| Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. | [optional] + **contingencyType** | **String**| Deprecated: linked orders are not supported after 2018/11/10. | [optional] **text** | **String**| Optional order annotation. e.g. 'Take profit'. | [optional] ### Return type @@ -424,7 +424,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -437,7 +437,7 @@ Name | Type | Description | Notes Create multiple new orders for the same symbol. -This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. +This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. ### Example ```java @@ -467,7 +467,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/android/docs/OrderBookApi.md b/auto-generated/android/docs/OrderBookApi.md index d8e528c79..b78799e53 100644 --- a/auto-generated/android/docs/OrderBookApi.md +++ b/auto-generated/android/docs/OrderBookApi.md @@ -1,6 +1,6 @@ # OrderBookApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/auto-generated/android/docs/PositionApi.md b/auto-generated/android/docs/PositionApi.md index 63b3a6141..141649f26 100644 --- a/auto-generated/android/docs/PositionApi.md +++ b/auto-generated/android/docs/PositionApi.md @@ -1,6 +1,6 @@ # PositionApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -17,7 +17,7 @@ Method | HTTP request | Description Get your positions. -See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html\">the FIX Spec</a> for explanations of these fields. +This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below. The fields _account_, _symbol_, _currency_ are unique to each position and form its key. - **account**: Your unique account ID. - **symbol**: The contract for this position. - **currency**: The margin currency for this position. - **underlying**: Meta data of the _symbol_. - **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_ - **commission**: The maximum of the maker, taker, and settlement fee. - **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage. - **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit. - **riskLimit**: This is a function of your _maintMarginReq_. - **leverage**: 1 / initMarginReq. - **crossMargin**: True/false depending on whether you set cross margin on this position. - **deleveragePercentile**: Indicates where your position is in the ADL queue. - **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position. - **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed. - **currentQty**: The current position amount in contracts. - **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_). - **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_). - **realisedCost**: The realised cost of this position calculated with regard to average cost accounting. - **unrealisedCost**: _currentCost_ - _realisedCost_. - **grossOpenCost**: The absolute value of your open orders for this symbol. - **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_). - **markPrice**: The mark price of the symbol in _quoteCurrency_. - **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_). - **homeNotional**: Value of position in units of _underlying_. - **foreignNotional**: Value of position in units of _quoteCurrency_. - **realisedPnl**: The negative of _realisedCost_. - **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_. - **unrealisedPnl**: _unrealisedGrossPnl_. - **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated. - **bankruptPrice**: Once markPrice reaches this price, this position will have no equity. ### Example ```java @@ -51,7 +51,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -94,7 +94,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -137,7 +137,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -180,7 +180,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -223,7 +223,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/android/docs/QuoteApi.md b/auto-generated/android/docs/QuoteApi.md index 20b73bf76..8bb50a462 100644 --- a/auto-generated/android/docs/QuoteApi.md +++ b/auto-generated/android/docs/QuoteApi.md @@ -1,6 +1,6 @@ # QuoteApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -20,7 +20,7 @@ Get Quotes. //import io.swagger.client.api.QuoteApi; QuoteApi apiInstance = new QuoteApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -41,7 +41,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] @@ -69,6 +69,8 @@ No authorization required Get previous quotes in time buckets. +Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. + ### Example ```java // Import classes: @@ -77,7 +79,7 @@ Get previous quotes in time buckets. QuoteApi apiInstance = new QuoteApi(); String binSize = "1m"; // String | Time interval to bucket by. Available options: [1m,5m,1h,1d]. Boolean partial = false; // Boolean | If true, will send in-progress (incomplete) bins for the current time period. -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -100,7 +102,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **binSize** | **String**| Time interval to bucket by. Available options: [1m,5m,1h,1d]. | [optional] [default to 1m] **partial** | **Boolean**| If true, will send in-progress (incomplete) bins for the current time period. | [optional] [default to false] - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/android/docs/QuoteFillRatio.md b/auto-generated/android/docs/QuoteFillRatio.md new file mode 100644 index 000000000..20ee54cd6 --- /dev/null +++ b/auto-generated/android/docs/QuoteFillRatio.md @@ -0,0 +1,16 @@ + +# QuoteFillRatio + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | [**Date**](Date.md) | | +**account** | **Double** | | [optional] +**quoteCount** | **Double** | | [optional] +**dealtCount** | **Double** | | [optional] +**quotesMavg7** | **Double** | | [optional] +**dealtMavg7** | **Double** | | [optional] +**quoteFillRatioMavg7** | **Double** | | [optional] + + + diff --git a/auto-generated/android/docs/SchemaApi.md b/auto-generated/android/docs/SchemaApi.md index 258ea214f..91b7f5ac4 100644 --- a/auto-generated/android/docs/SchemaApi.md +++ b/auto-generated/android/docs/SchemaApi.md @@ -1,6 +1,6 @@ # SchemaApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/auto-generated/android/docs/SettlementApi.md b/auto-generated/android/docs/SettlementApi.md index 2b3d97b6b..69c923114 100644 --- a/auto-generated/android/docs/SettlementApi.md +++ b/auto-generated/android/docs/SettlementApi.md @@ -1,6 +1,6 @@ # SettlementApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,7 +19,7 @@ Get settlement history. //import io.swagger.client.api.SettlementApi; SettlementApi apiInstance = new SettlementApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -40,7 +40,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/android/docs/StatsApi.md b/auto-generated/android/docs/StatsApi.md index c4fe18a90..fab40ed3f 100644 --- a/auto-generated/android/docs/StatsApi.md +++ b/auto-generated/android/docs/StatsApi.md @@ -1,6 +1,6 @@ # StatsApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/auto-generated/android/docs/TradeApi.md b/auto-generated/android/docs/TradeApi.md index a38c25c95..e58a63a55 100644 --- a/auto-generated/android/docs/TradeApi.md +++ b/auto-generated/android/docs/TradeApi.md @@ -1,6 +1,6 @@ # TradeApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -22,7 +22,7 @@ Please note that indices (symbols starting with `.`) post trades at in //import io.swagger.client.api.TradeApi; TradeApi apiInstance = new TradeApi(); -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -43,7 +43,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] @@ -71,6 +71,8 @@ No authorization required Get previous trades in time buckets. +Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. Also note the `open` price is equal to the `close` price of the previous timeframe bucket. + ### Example ```java // Import classes: @@ -79,7 +81,7 @@ Get previous trades in time buckets. TradeApi apiInstance = new TradeApi(); String binSize = "1m"; // String | Time interval to bucket by. Available options: [1m,5m,1h,1d]. Boolean partial = false; // Boolean | If true, will send in-progress (incomplete) bins for the current time period. -String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. +String symbol = "symbol_example"; // String | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. String filter = "filter_example"; // String | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. String columns = "columns_example"; // String | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. BigDecimal count = new BigDecimal(); // BigDecimal | Number of results to fetch. @@ -102,7 +104,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **binSize** | **String**| Time interval to bucket by. Available options: [1m,5m,1h,1d]. | [optional] [default to 1m] **partial** | **Boolean**| If true, will send in-progress (incomplete) bins for the current time period. | [optional] [default to false] - **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **String**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **String**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **String**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **BigDecimal**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/android/docs/UserApi.md b/auto-generated/android/docs/UserApi.md index 2eb705fca..a85e8c395 100644 --- a/auto-generated/android/docs/UserApi.md +++ b/auto-generated/android/docs/UserApi.md @@ -1,30 +1,28 @@ # UserApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**userCancelWithdrawal**](UserApi.md#userCancelWithdrawal) | **POST** /user/cancelWithdrawal | Cancel a withdrawal. [**userCheckReferralCode**](UserApi.md#userCheckReferralCode) | **GET** /user/checkReferralCode | Check if a referral code is valid. +[**userCommunicationToken**](UserApi.md#userCommunicationToken) | **POST** /user/communicationToken | Register your communication token for mobile clients [**userConfirm**](UserApi.md#userConfirm) | **POST** /user/confirmEmail | Confirm your email address with a token. -[**userConfirmEnableTFA**](UserApi.md#userConfirmEnableTFA) | **POST** /user/confirmEnableTFA | Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. [**userConfirmWithdrawal**](UserApi.md#userConfirmWithdrawal) | **POST** /user/confirmWithdrawal | Confirm a withdrawal. -[**userDisableTFA**](UserApi.md#userDisableTFA) | **POST** /user/disableTFA | Disable two-factor auth for this account. [**userGet**](UserApi.md#userGet) | **GET** /user | Get your user model. [**userGetAffiliateStatus**](UserApi.md#userGetAffiliateStatus) | **GET** /user/affiliateStatus | Get your current affiliate/referral status. [**userGetCommission**](UserApi.md#userGetCommission) | **GET** /user/commission | Get your account's commission status. [**userGetDepositAddress**](UserApi.md#userGetDepositAddress) | **GET** /user/depositAddress | Get a deposit address. +[**userGetExecutionHistory**](UserApi.md#userGetExecutionHistory) | **GET** /user/executionHistory | Get the execution history by day. [**userGetMargin**](UserApi.md#userGetMargin) | **GET** /user/margin | Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. +[**userGetQuoteFillRatio**](UserApi.md#userGetQuoteFillRatio) | **GET** /user/quoteFillRatio | Get 7 days worth of Quote Fill Ratio statistics. [**userGetWallet**](UserApi.md#userGetWallet) | **GET** /user/wallet | Get your current wallet information. [**userGetWalletHistory**](UserApi.md#userGetWalletHistory) | **GET** /user/walletHistory | Get a history of all of your wallet transactions (deposits, withdrawals, PNL). [**userGetWalletSummary**](UserApi.md#userGetWalletSummary) | **GET** /user/walletSummary | Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). [**userLogout**](UserApi.md#userLogout) | **POST** /user/logout | Log out of BitMEX. -[**userLogoutAll**](UserApi.md#userLogoutAll) | **POST** /user/logoutAll | Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. [**userMinWithdrawalFee**](UserApi.md#userMinWithdrawalFee) | **GET** /user/minWithdrawalFee | Get the minimum withdrawal fee for a currency. -[**userRequestEnableTFA**](UserApi.md#userRequestEnableTFA) | **POST** /user/requestEnableTFA | Get secret key for setting up two-factor auth. [**userRequestWithdrawal**](UserApi.md#userRequestWithdrawal) | **POST** /user/requestWithdrawal | Request a withdrawal to an external wallet. [**userSavePreferences**](UserApi.md#userSavePreferences) | **POST** /user/preferences | Save user preferences. -[**userUpdate**](UserApi.md#userUpdate) | **PUT** /user | Update your password, name, and other attributes. @@ -74,7 +72,7 @@ No authorization required Check if a referral code is valid. -If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404. +If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid. ### Example ```java @@ -111,11 +109,11 @@ No authorization required - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userConfirm** -> AccessToken userConfirm(token) + +# **userCommunicationToken** +> List<CommunicationToken> userCommunicationToken(token, platformAgent) -Confirm your email address with a token. +Register your communication token for mobile clients ### Example ```java @@ -124,11 +122,12 @@ Confirm your email address with a token. UserApi apiInstance = new UserApi(); String token = "token_example"; // String | +String platformAgent = "platformAgent_example"; // String | try { - AccessToken result = apiInstance.userConfirm(token); + List result = apiInstance.userCommunicationToken(token, platformAgent); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userConfirm"); + System.err.println("Exception when calling UserApi#userCommunicationToken"); e.printStackTrace(); } ``` @@ -138,25 +137,26 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **token** | **String**| | + **platformAgent** | **String**| | ### Return type -[**AccessToken**](AccessToken.md) +[**List<CommunicationToken>**](CommunicationToken.md) ### Authorization -No authorization required +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userConfirmEnableTFA** -> Boolean userConfirmEnableTFA(token, type) + +# **userConfirm** +> AccessToken userConfirm(token) -Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. +Confirm your email address with a token. ### Example ```java @@ -164,13 +164,12 @@ Confirm two-factor auth for this account. If using a Yubikey, simply send a toke //import io.swagger.client.api.UserApi; UserApi apiInstance = new UserApi(); -String token = "token_example"; // String | Token from your selected TFA type. -String type = "type_example"; // String | Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' +String token = "token_example"; // String | try { - Boolean result = apiInstance.userConfirmEnableTFA(token, type); + AccessToken result = apiInstance.userConfirm(token); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userConfirmEnableTFA"); + System.err.println("Exception when calling UserApi#userConfirm"); e.printStackTrace(); } ``` @@ -179,16 +178,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **token** | **String**| Token from your selected TFA type. | - **type** | **String**| Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' | [optional] + **token** | **String**| | ### Return type -**Boolean** +[**AccessToken**](AccessToken.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +No authorization required ### HTTP request headers @@ -231,49 +229,6 @@ Name | Type | Description | Notes No authorization required -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - - -# **userDisableTFA** -> Boolean userDisableTFA(token, type) - -Disable two-factor auth for this account. - -### Example -```java -// Import classes: -//import io.swagger.client.api.UserApi; - -UserApi apiInstance = new UserApi(); -String token = "token_example"; // String | Token from your selected TFA type. -String type = "type_example"; // String | Two-factor auth type. Supported types: 'GA' (Google Authenticator) -try { - Boolean result = apiInstance.userDisableTFA(token, type); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#userDisableTFA"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **String**| Token from your selected TFA type. | - **type** | **String**| Two-factor auth type. Supported types: 'GA' (Google Authenticator) | [optional] - -### Return type - -**Boolean** - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded @@ -309,7 +264,7 @@ This endpoint does not need any parameter. ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -346,7 +301,7 @@ This endpoint does not need any parameter. ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -355,7 +310,7 @@ This endpoint does not need any parameter. # **userGetCommission** -> List<UserCommission> userGetCommission() +> UserCommissionsBySymbol userGetCommission() Get your account's commission status. @@ -366,7 +321,7 @@ Get your account's commission status. UserApi apiInstance = new UserApi(); try { - List result = apiInstance.userGetCommission(); + UserCommissionsBySymbol result = apiInstance.userGetCommission(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#userGetCommission"); @@ -379,11 +334,11 @@ This endpoint does not need any parameter. ### Return type -[**List<UserCommission>**](UserCommission.md) +[**UserCommissionsBySymbol**](UserCommissionsBySymbol.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -424,18 +379,18 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userGetMargin** -> Margin userGetMargin(currency) + +# **userGetExecutionHistory** +> Object userGetExecutionHistory(symbol, timestamp) -Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. +Get the execution history by day. ### Example ```java @@ -443,12 +398,13 @@ Get your account's margin status. Send a currency of \"all\" to re //import io.swagger.client.api.UserApi; UserApi apiInstance = new UserApi(); -String currency = "XBt"; // String | +String symbol = "XBTUSD"; // String | +Date timestamp = new Date(); // Date | try { - Margin result = apiInstance.userGetMargin(currency); + Object result = apiInstance.userGetExecutionHistory(symbol, timestamp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userGetMargin"); + System.err.println("Exception when calling UserApi#userGetExecutionHistory"); e.printStackTrace(); } ``` @@ -457,26 +413,27 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **String**| | [optional] [default to XBt] + **symbol** | **String**| | [default to XBTUSD] + **timestamp** | **Date**| | [default to 2017-02-13T12:00:00.000Z] ### Return type -[**Margin**](Margin.md) +**Object** ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userGetWallet** -> Wallet userGetWallet(currency) + +# **userGetMargin** +> Margin userGetMargin(currency) -Get your current wallet information. +Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. ### Example ```java @@ -486,10 +443,10 @@ Get your current wallet information. UserApi apiInstance = new UserApi(); String currency = "XBt"; // String | try { - Wallet result = apiInstance.userGetWallet(currency); + Margin result = apiInstance.userGetMargin(currency); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userGetWallet"); + System.err.println("Exception when calling UserApi#userGetMargin"); e.printStackTrace(); } ``` @@ -502,22 +459,22 @@ Name | Type | Description | Notes ### Return type -[**Wallet**](Wallet.md) +[**Margin**](Margin.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userGetWalletHistory** -> List<Transaction> userGetWalletHistory(currency) + +# **userGetQuoteFillRatio** +> QuoteFillRatio userGetQuoteFillRatio() -Get a history of all of your wallet transactions (deposits, withdrawals, PNL). +Get 7 days worth of Quote Fill Ratio statistics. ### Example ```java @@ -525,40 +482,36 @@ Get a history of all of your wallet transactions (deposits, withdrawals, PNL). //import io.swagger.client.api.UserApi; UserApi apiInstance = new UserApi(); -String currency = "XBt"; // String | try { - List result = apiInstance.userGetWalletHistory(currency); + QuoteFillRatio result = apiInstance.userGetQuoteFillRatio(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userGetWalletHistory"); + System.err.println("Exception when calling UserApi#userGetQuoteFillRatio"); e.printStackTrace(); } ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **String**| | [optional] [default to XBt] +This endpoint does not need any parameter. ### Return type -[**List<Transaction>**](Transaction.md) +[**QuoteFillRatio**](QuoteFillRatio.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userGetWalletSummary** -> List<Transaction> userGetWalletSummary(currency) + +# **userGetWallet** +> Wallet userGetWallet(currency) -Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). +Get your current wallet information. ### Example ```java @@ -568,10 +521,10 @@ Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). UserApi apiInstance = new UserApi(); String currency = "XBt"; // String | try { - List result = apiInstance.userGetWalletSummary(currency); + Wallet result = apiInstance.userGetWallet(currency); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userGetWalletSummary"); + System.err.println("Exception when calling UserApi#userGetWallet"); e.printStackTrace(); } ``` @@ -584,22 +537,22 @@ Name | Type | Description | Notes ### Return type -[**List<Transaction>**](Transaction.md) +[**Wallet**](Wallet.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userLogout** -> userLogout() + +# **userGetWalletHistory** +> List<Transaction> userGetWalletHistory(currency, count, start) -Log out of BitMEX. +Get a history of all of your wallet transactions (deposits, withdrawals, PNL). ### Example ```java @@ -607,35 +560,44 @@ Log out of BitMEX. //import io.swagger.client.api.UserApi; UserApi apiInstance = new UserApi(); +String currency = "XBt"; // String | +Double count = 3.4D; // Double | Number of results to fetch. +Double start = 3.4D; // Double | Starting point for results. try { - apiInstance.userLogout(); + List result = apiInstance.userGetWalletHistory(currency, count, start); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userLogout"); + System.err.println("Exception when calling UserApi#userGetWalletHistory"); e.printStackTrace(); } ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **String**| | [optional] [default to XBt] + **count** | **Double**| Number of results to fetch. | [optional] [default to 100] + **start** | **Double**| Starting point for results. | [optional] [default to 0] ### Return type -null (empty response body) +[**List<Transaction>**](Transaction.md) ### Authorization -No authorization required +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userLogoutAll** -> Double userLogoutAll() + +# **userGetWalletSummary** +> List<Transaction> userGetWalletSummary(currency) -Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. +Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). ### Example ```java @@ -643,38 +605,40 @@ Log all systems out of BitMEX. This will revoke all of your account's access //import io.swagger.client.api.UserApi; UserApi apiInstance = new UserApi(); +String currency = "XBt"; // String | try { - Double result = apiInstance.userLogoutAll(); + List result = apiInstance.userGetWalletSummary(currency); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userLogoutAll"); + System.err.println("Exception when calling UserApi#userGetWalletSummary"); e.printStackTrace(); } ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **String**| | [optional] [default to XBt] ### Return type -**Double** +[**List<Transaction>**](Transaction.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userMinWithdrawalFee** -> Object userMinWithdrawalFee(currency) - -Get the minimum withdrawal fee for a currency. + +# **userLogout** +> userLogout() -This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency. +Log out of BitMEX. ### Example ```java @@ -682,25 +646,20 @@ This is changed based on network conditions to ensure timely withdrawals. During //import io.swagger.client.api.UserApi; UserApi apiInstance = new UserApi(); -String currency = "XBt"; // String | try { - Object result = apiInstance.userMinWithdrawalFee(currency); - System.out.println(result); + apiInstance.userLogout(); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userMinWithdrawalFee"); + System.err.println("Exception when calling UserApi#userLogout"); e.printStackTrace(); } ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **String**| | [optional] [default to XBt] +This endpoint does not need any parameter. ### Return type -**Object** +null (empty response body) ### Authorization @@ -711,13 +670,13 @@ No authorization required - **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -# **userRequestEnableTFA** -> Boolean userRequestEnableTFA(type) + +# **userMinWithdrawalFee** +> Object userMinWithdrawalFee(currency) -Get secret key for setting up two-factor auth. +Get the minimum withdrawal fee for a currency. -Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled. +This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency. ### Example ```java @@ -725,12 +684,12 @@ Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enable //import io.swagger.client.api.UserApi; UserApi apiInstance = new UserApi(); -String type = "type_example"; // String | Two-factor auth type. Supported types: 'GA' (Google Authenticator) +String currency = "XBt"; // String | try { - Boolean result = apiInstance.userRequestEnableTFA(type); + Object result = apiInstance.userMinWithdrawalFee(currency); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#userRequestEnableTFA"); + System.err.println("Exception when calling UserApi#userMinWithdrawalFee"); e.printStackTrace(); } ``` @@ -739,15 +698,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **String**| Two-factor auth type. Supported types: 'GA' (Google Authenticator) | [optional] + **currency** | **String**| | [optional] [default to XBt] ### Return type -**Boolean** +**Object** ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +No authorization required ### HTTP request headers @@ -756,11 +715,11 @@ Name | Type | Description | Notes # **userRequestWithdrawal** -> Transaction userRequestWithdrawal(currency, amount, address, otpToken, fee) +> Transaction userRequestWithdrawal(currency, amount, address, otpToken, fee, text) Request a withdrawal to an external wallet. -This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission. +This will send a confirmation email to the email address on record. ### Example ```java @@ -773,8 +732,9 @@ BigDecimal amount = new BigDecimal(); // BigDecimal | Amount of withdrawal curre String address = "address_example"; // String | Destination Address. String otpToken = "otpToken_example"; // String | 2FA token. Required if 2FA is enabled on your account. Double fee = 3.4D; // Double | Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. +String text = "text_example"; // String | Optional annotation, e.g. 'Transfer to home wallet'. try { - Transaction result = apiInstance.userRequestWithdrawal(currency, amount, address, otpToken, fee); + Transaction result = apiInstance.userRequestWithdrawal(currency, amount, address, otpToken, fee, text); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#userRequestWithdrawal"); @@ -791,6 +751,7 @@ Name | Type | Description | Notes **address** | **String**| Destination Address. | **otpToken** | **String**| 2FA token. Required if 2FA is enabled on your account. | [optional] **fee** | **Double**| Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. | [optional] + **text** | **String**| Optional annotation, e.g. 'Transfer to home wallet'. | [optional] ### Return type @@ -798,7 +759,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -841,62 +802,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - - -# **userUpdate** -> User userUpdate(firstname, lastname, oldPassword, newPassword, newPasswordConfirm, username, country, pgpPubKey) - -Update your password, name, and other attributes. - -### Example -```java -// Import classes: -//import io.swagger.client.api.UserApi; - -UserApi apiInstance = new UserApi(); -String firstname = "firstname_example"; // String | -String lastname = "lastname_example"; // String | -String oldPassword = "oldPassword_example"; // String | -String newPassword = "newPassword_example"; // String | -String newPasswordConfirm = "newPasswordConfirm_example"; // String | -String username = "username_example"; // String | Username can only be set once. To reset, email support. -String country = "country_example"; // String | Country of residence. -String pgpPubKey = "pgpPubKey_example"; // String | PGP Public Key. If specified, automated emails will be sentwith this key. -try { - User result = apiInstance.userUpdate(firstname, lastname, oldPassword, newPassword, newPasswordConfirm, username, country, pgpPubKey); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling UserApi#userUpdate"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **firstname** | **String**| | [optional] - **lastname** | **String**| | [optional] - **oldPassword** | **String**| | [optional] - **newPassword** | **String**| | [optional] - **newPasswordConfirm** | **String**| | [optional] - **username** | **String**| Username can only be set once. To reset, email support. | [optional] - **country** | **String**| Country of residence. | [optional] - **pgpPubKey** | **String**| PGP Public Key. If specified, automated emails will be sentwith this key. | [optional] - -### Return type - -[**User**](User.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/android/docs/UserCommission.md b/auto-generated/android/docs/UserCommission.md deleted file mode 100644 index a51b7e62f..000000000 --- a/auto-generated/android/docs/UserCommission.md +++ /dev/null @@ -1,13 +0,0 @@ - -# UserCommission - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**makerFee** | **Double** | | [optional] -**takerFee** | **Double** | | [optional] -**settlementFee** | **Double** | | [optional] -**maxFee** | **Double** | | [optional] - - - diff --git a/auto-generated/android/docs/InlineResponse2001.md b/auto-generated/android/docs/UserCommissionsBySymbol.md similarity index 65% rename from auto-generated/android/docs/InlineResponse2001.md rename to auto-generated/android/docs/UserCommissionsBySymbol.md index b57965cc9..8603a7caf 100644 --- a/auto-generated/android/docs/InlineResponse2001.md +++ b/auto-generated/android/docs/UserCommissionsBySymbol.md @@ -1,10 +1,9 @@ -# InlineResponse2001 +# UserCommissionsBySymbol ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | | [optional] diff --git a/auto-generated/android/docs/UserEvent.md b/auto-generated/android/docs/UserEvent.md new file mode 100644 index 000000000..61fe885df --- /dev/null +++ b/auto-generated/android/docs/UserEvent.md @@ -0,0 +1,32 @@ + +# UserEvent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Double** | | [optional] +**type** | [**TypeEnum**](#TypeEnum) | | +**status** | [**StatusEnum**](#StatusEnum) | | +**userId** | **Double** | | +**createdById** | **Double** | | +**ip** | **String** | | [optional] +**geoipCountry** | **String** | | [optional] +**geoipRegion** | **String** | | [optional] +**geoipSubRegion** | **String** | | [optional] +**eventMeta** | **Object** | | [optional] +**created** | [**Date**](Date.md) | | + + + +## Enum: TypeEnum +Name | Value +---- | ----- + + + +## Enum: StatusEnum +Name | Value +---- | ----- + + + diff --git a/auto-generated/android/docs/UserEventApi.md b/auto-generated/android/docs/UserEventApi.md new file mode 100644 index 000000000..ede962786 --- /dev/null +++ b/auto-generated/android/docs/UserEventApi.md @@ -0,0 +1,52 @@ +# UserEventApi + +All URIs are relative to *https://www.bitmex.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**userEventGet**](UserEventApi.md#userEventGet) | **GET** /userEvent | Get your user events + + + +# **userEventGet** +> List<UserEvent> userEventGet(count, startId) + +Get your user events + +### Example +```java +// Import classes: +//import io.swagger.client.api.UserEventApi; + +UserEventApi apiInstance = new UserEventApi(); +Double count = 3.4D; // Double | Number of results to fetch. +Double startId = 3.4D; // Double | Cursor for pagination. +try { + List result = apiInstance.userEventGet(count, startId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserEventApi#userEventGet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **count** | **Double**| Number of results to fetch. | [optional] [default to 150] + **startId** | **Double**| Cursor for pagination. | [optional] + +### Return type + +[**List<UserEvent>**](UserEvent.md) + +### Authorization + +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded + - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript + diff --git a/auto-generated/android/docs/UserPreferences.md b/auto-generated/android/docs/UserPreferences.md index 35bb1492c..ae4fcd4cf 100644 --- a/auto-generated/android/docs/UserPreferences.md +++ b/auto-generated/android/docs/UserPreferences.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **currency** | **String** | | [optional] **debug** | **Boolean** | | [optional] **disableEmails** | **List<String>** | | [optional] +**disablePush** | **List<String>** | | [optional] **hideConfirmDialogs** | **List<String>** | | [optional] **hideConnectionModal** | **Boolean** | | [optional] **hideFromLeaderboard** | **Boolean** | | [optional] diff --git a/auto-generated/android/src/main/java/io/swagger/client/ApiException.java b/auto-generated/android/src/main/java/io/swagger/client/ApiException.java index abf30f42d..033fc9600 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/ApiException.java +++ b/auto-generated/android/src/main/java/io/swagger/client/ApiException.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/ApiInvoker.java b/auto-generated/android/src/main/java/io/swagger/client/ApiInvoker.java index 70be6a90c..b72e90eba 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/ApiInvoker.java +++ b/auto-generated/android/src/main/java/io/swagger/client/ApiInvoker.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -203,8 +203,8 @@ public static void initializeInstance(Cache cache, Network network, int threadPo // Setup authentications (key: authentication name, value: authentication). INSTANCE.authentications = new HashMap(); + INSTANCE.authentications.put("apiExpires", new ApiKeyAuth("header", "api-expires")); INSTANCE.authentications.put("apiKey", new ApiKeyAuth("header", "api-key")); - INSTANCE.authentications.put("apiNonce", new ApiKeyAuth("header", "api-nonce")); INSTANCE.authentications.put("apiSignature", new ApiKeyAuth("header", "api-signature")); // Prevent the authentications from being modified. INSTANCE.authentications = Collections.unmodifiableMap(INSTANCE.authentications); diff --git a/auto-generated/android/src/main/java/io/swagger/client/JsonUtil.java b/auto-generated/android/src/main/java/io/swagger/client/JsonUtil.java index 3ced27869..be59391bd 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/JsonUtil.java +++ b/auto-generated/android/src/main/java/io/swagger/client/JsonUtil.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -81,6 +81,10 @@ public static Type getListTypeForDeserialization(Class cls) { return new TypeToken>(){}.getType(); } + if ("CommunicationToken".equalsIgnoreCase(className)) { + return new TypeToken>(){}.getType(); + } + if ("ConnectedUsers".equalsIgnoreCase(className)) { return new TypeToken>(){}.getType(); } @@ -101,6 +105,10 @@ public static Type getListTypeForDeserialization(Class cls) { return new TypeToken>(){}.getType(); } + if ("GlobalNotification".equalsIgnoreCase(className)) { + return new TypeToken>(){}.getType(); + } + if ("IndexComposite".equalsIgnoreCase(className)) { return new TypeToken>(){}.getType(); } @@ -109,10 +117,6 @@ public static Type getListTypeForDeserialization(Class cls) { return new TypeToken>(){}.getType(); } - if ("InlineResponse2001".equalsIgnoreCase(className)) { - return new TypeToken>(){}.getType(); - } - if ("Instrument".equalsIgnoreCase(className)) { return new TypeToken>(){}.getType(); } @@ -137,10 +141,6 @@ public static Type getListTypeForDeserialization(Class cls) { return new TypeToken>(){}.getType(); } - if ("Notification".equalsIgnoreCase(className)) { - return new TypeToken>(){}.getType(); - } - if ("Order".equalsIgnoreCase(className)) { return new TypeToken>(){}.getType(); } @@ -157,6 +157,10 @@ public static Type getListTypeForDeserialization(Class cls) { return new TypeToken>(){}.getType(); } + if ("QuoteFillRatio".equalsIgnoreCase(className)) { + return new TypeToken>(){}.getType(); + } + if ("Settlement".equalsIgnoreCase(className)) { return new TypeToken>(){}.getType(); } @@ -189,8 +193,12 @@ public static Type getListTypeForDeserialization(Class cls) { return new TypeToken>(){}.getType(); } - if ("UserCommission".equalsIgnoreCase(className)) { - return new TypeToken>(){}.getType(); + if ("UserCommissionsBySymbol".equalsIgnoreCase(className)) { + return new TypeToken>(){}.getType(); + } + + if ("UserEvent".equalsIgnoreCase(className)) { + return new TypeToken>(){}.getType(); } if ("UserPreferences".equalsIgnoreCase(className)) { @@ -235,6 +243,10 @@ public static Type getTypeForDeserialization(Class cls) { return new TypeToken(){}.getType(); } + if ("CommunicationToken".equalsIgnoreCase(className)) { + return new TypeToken(){}.getType(); + } + if ("ConnectedUsers".equalsIgnoreCase(className)) { return new TypeToken(){}.getType(); } @@ -255,6 +267,10 @@ public static Type getTypeForDeserialization(Class cls) { return new TypeToken(){}.getType(); } + if ("GlobalNotification".equalsIgnoreCase(className)) { + return new TypeToken(){}.getType(); + } + if ("IndexComposite".equalsIgnoreCase(className)) { return new TypeToken(){}.getType(); } @@ -263,10 +279,6 @@ public static Type getTypeForDeserialization(Class cls) { return new TypeToken(){}.getType(); } - if ("InlineResponse2001".equalsIgnoreCase(className)) { - return new TypeToken(){}.getType(); - } - if ("Instrument".equalsIgnoreCase(className)) { return new TypeToken(){}.getType(); } @@ -291,10 +303,6 @@ public static Type getTypeForDeserialization(Class cls) { return new TypeToken(){}.getType(); } - if ("Notification".equalsIgnoreCase(className)) { - return new TypeToken(){}.getType(); - } - if ("Order".equalsIgnoreCase(className)) { return new TypeToken(){}.getType(); } @@ -311,6 +319,10 @@ public static Type getTypeForDeserialization(Class cls) { return new TypeToken(){}.getType(); } + if ("QuoteFillRatio".equalsIgnoreCase(className)) { + return new TypeToken(){}.getType(); + } + if ("Settlement".equalsIgnoreCase(className)) { return new TypeToken(){}.getType(); } @@ -343,8 +355,12 @@ public static Type getTypeForDeserialization(Class cls) { return new TypeToken(){}.getType(); } - if ("UserCommission".equalsIgnoreCase(className)) { - return new TypeToken(){}.getType(); + if ("UserCommissionsBySymbol".equalsIgnoreCase(className)) { + return new TypeToken(){}.getType(); + } + + if ("UserEvent".equalsIgnoreCase(className)) { + return new TypeToken(){}.getType(); } if ("UserPreferences".equalsIgnoreCase(className)) { diff --git a/auto-generated/android/src/main/java/io/swagger/client/Pair.java b/auto-generated/android/src/main/java/io/swagger/client/Pair.java index 8ba83b49f..b09455433 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/Pair.java +++ b/auto-generated/android/src/main/java/io/swagger/client/Pair.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/APIKeyApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/APIKeyApi.java index bcd0a872b..86e01b51e 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/APIKeyApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/APIKeyApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -25,7 +25,6 @@ import io.swagger.client.model.APIKey; import io.swagger.client.model.Error; -import io.swagger.client.model.InlineResponse200; import org.apache.http.HttpEntity; import org.apache.http.entity.mime.MultipartEntityBuilder; @@ -38,7 +37,7 @@ import java.util.concurrent.TimeoutException; public class APIKeyApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -57,282 +56,6 @@ public String getBasePath() { return basePath; } - /** - * Disable an API Key. - * - * @param apiKeyID API Key ID (public component). - * @return APIKey - */ - public APIKey aPIKeyDisable (String apiKeyID) throws TimeoutException, ExecutionException, InterruptedException, ApiException { - Object postBody = null; - // verify the required parameter 'apiKeyID' is set - if (apiKeyID == null) { - VolleyError error = new VolleyError("Missing the required parameter 'apiKeyID' when calling aPIKeyDisable", - new ApiException(400, "Missing the required parameter 'apiKeyID' when calling aPIKeyDisable")); - } - - // create path and map variables - String path = "/apiKey/disable"; - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - String[] contentTypes = { - "application/json", - "application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (apiKeyID != null) { - localVarBuilder.addTextBody("apiKeyID", ApiInvoker.parameterToString(apiKeyID), ApiInvoker.TEXT_PLAIN_UTF8); - } - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("apiKeyID", ApiInvoker.parameterToString(apiKeyID)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); - if (localVarResponse != null) { - return (APIKey) ApiInvoker.deserialize(localVarResponse, "", APIKey.class); - } else { - return null; - } - } catch (ApiException ex) { - throw ex; - } catch (InterruptedException ex) { - throw ex; - } catch (ExecutionException ex) { - if (ex.getCause() instanceof VolleyError) { - VolleyError volleyError = (VolleyError)ex.getCause(); - if (volleyError.networkResponse != null) { - throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage()); - } - } - throw ex; - } catch (TimeoutException ex) { - throw ex; - } - } - - /** - * Disable an API Key. - * - * @param apiKeyID API Key ID (public component). - */ - public void aPIKeyDisable (String apiKeyID, final Response.Listener responseListener, final Response.ErrorListener errorListener) { - Object postBody = null; - - // verify the required parameter 'apiKeyID' is set - if (apiKeyID == null) { - VolleyError error = new VolleyError("Missing the required parameter 'apiKeyID' when calling aPIKeyDisable", - new ApiException(400, "Missing the required parameter 'apiKeyID' when calling aPIKeyDisable")); - } - - // create path and map variables - String path = "/apiKey/disable".replaceAll("\\{format\\}","json"); - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - - - - String[] contentTypes = { - "application/json","application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - - if (apiKeyID != null) { - localVarBuilder.addTextBody("apiKeyID", ApiInvoker.parameterToString(apiKeyID), ApiInvoker.TEXT_PLAIN_UTF8); - } - - - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("apiKeyID", ApiInvoker.parameterToString(apiKeyID)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, - new Response.Listener() { - @Override - public void onResponse(String localVarResponse) { - try { - responseListener.onResponse((APIKey) ApiInvoker.deserialize(localVarResponse, "", APIKey.class)); - } catch (ApiException exception) { - errorListener.onErrorResponse(new VolleyError(exception)); - } - } - }, new Response.ErrorListener() { - @Override - public void onErrorResponse(VolleyError error) { - errorListener.onErrorResponse(error); - } - }); - } catch (ApiException ex) { - errorListener.onErrorResponse(new VolleyError(ex)); - } - } - /** - * Enable an API Key. - * - * @param apiKeyID API Key ID (public component). - * @return APIKey - */ - public APIKey aPIKeyEnable (String apiKeyID) throws TimeoutException, ExecutionException, InterruptedException, ApiException { - Object postBody = null; - // verify the required parameter 'apiKeyID' is set - if (apiKeyID == null) { - VolleyError error = new VolleyError("Missing the required parameter 'apiKeyID' when calling aPIKeyEnable", - new ApiException(400, "Missing the required parameter 'apiKeyID' when calling aPIKeyEnable")); - } - - // create path and map variables - String path = "/apiKey/enable"; - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - String[] contentTypes = { - "application/json", - "application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (apiKeyID != null) { - localVarBuilder.addTextBody("apiKeyID", ApiInvoker.parameterToString(apiKeyID), ApiInvoker.TEXT_PLAIN_UTF8); - } - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("apiKeyID", ApiInvoker.parameterToString(apiKeyID)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); - if (localVarResponse != null) { - return (APIKey) ApiInvoker.deserialize(localVarResponse, "", APIKey.class); - } else { - return null; - } - } catch (ApiException ex) { - throw ex; - } catch (InterruptedException ex) { - throw ex; - } catch (ExecutionException ex) { - if (ex.getCause() instanceof VolleyError) { - VolleyError volleyError = (VolleyError)ex.getCause(); - if (volleyError.networkResponse != null) { - throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage()); - } - } - throw ex; - } catch (TimeoutException ex) { - throw ex; - } - } - - /** - * Enable an API Key. - * - * @param apiKeyID API Key ID (public component). - */ - public void aPIKeyEnable (String apiKeyID, final Response.Listener responseListener, final Response.ErrorListener errorListener) { - Object postBody = null; - - // verify the required parameter 'apiKeyID' is set - if (apiKeyID == null) { - VolleyError error = new VolleyError("Missing the required parameter 'apiKeyID' when calling aPIKeyEnable", - new ApiException(400, "Missing the required parameter 'apiKeyID' when calling aPIKeyEnable")); - } - - // create path and map variables - String path = "/apiKey/enable".replaceAll("\\{format\\}","json"); - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - - - - String[] contentTypes = { - "application/json","application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - - if (apiKeyID != null) { - localVarBuilder.addTextBody("apiKeyID", ApiInvoker.parameterToString(apiKeyID), ApiInvoker.TEXT_PLAIN_UTF8); - } - - - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("apiKeyID", ApiInvoker.parameterToString(apiKeyID)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, - new Response.Listener() { - @Override - public void onResponse(String localVarResponse) { - try { - responseListener.onResponse((APIKey) ApiInvoker.deserialize(localVarResponse, "", APIKey.class)); - } catch (ApiException exception) { - errorListener.onErrorResponse(new VolleyError(exception)); - } - } - }, new Response.ErrorListener() { - @Override - public void onErrorResponse(VolleyError error) { - errorListener.onErrorResponse(error); - } - }); - } catch (ApiException ex) { - errorListener.onErrorResponse(new VolleyError(ex)); - } - } /** * Get your API Keys. * @@ -367,7 +90,7 @@ public List aPIKeyGet (Boolean reverse) throws TimeoutException, Executi // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -431,7 +154,7 @@ public void aPIKeyGet (Boolean reverse, final Response.Listener> re // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -454,310 +177,4 @@ public void onErrorResponse(VolleyError error) { errorListener.onErrorResponse(new VolleyError(ex)); } } - /** - * Create a new API Key. - * API Keys can only be created via the frontend. - * @param name Key name. This name is for reference only. - * @param cidr CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. <a href=\"http://software77.net/cidr-101.html\">More on CIDR blocks</a> - * @param permissions Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"]. - * @param enabled Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. - * @param token OTP Token (YubiKey, Google Authenticator) - * @return APIKey - */ - public APIKey aPIKeyNew (String name, String cidr, String permissions, Boolean enabled, String token) throws TimeoutException, ExecutionException, InterruptedException, ApiException { - Object postBody = null; - - // create path and map variables - String path = "/apiKey"; - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - String[] contentTypes = { - "application/json", - "application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (name != null) { - localVarBuilder.addTextBody("name", ApiInvoker.parameterToString(name), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (cidr != null) { - localVarBuilder.addTextBody("cidr", ApiInvoker.parameterToString(cidr), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (permissions != null) { - localVarBuilder.addTextBody("permissions", ApiInvoker.parameterToString(permissions), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (enabled != null) { - localVarBuilder.addTextBody("enabled", ApiInvoker.parameterToString(enabled), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (token != null) { - localVarBuilder.addTextBody("token", ApiInvoker.parameterToString(token), ApiInvoker.TEXT_PLAIN_UTF8); - } - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("name", ApiInvoker.parameterToString(name)); - formParams.put("cidr", ApiInvoker.parameterToString(cidr)); - formParams.put("permissions", ApiInvoker.parameterToString(permissions)); - formParams.put("enabled", ApiInvoker.parameterToString(enabled)); - formParams.put("token", ApiInvoker.parameterToString(token)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); - if (localVarResponse != null) { - return (APIKey) ApiInvoker.deserialize(localVarResponse, "", APIKey.class); - } else { - return null; - } - } catch (ApiException ex) { - throw ex; - } catch (InterruptedException ex) { - throw ex; - } catch (ExecutionException ex) { - if (ex.getCause() instanceof VolleyError) { - VolleyError volleyError = (VolleyError)ex.getCause(); - if (volleyError.networkResponse != null) { - throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage()); - } - } - throw ex; - } catch (TimeoutException ex) { - throw ex; - } - } - - /** - * Create a new API Key. - * API Keys can only be created via the frontend. - * @param name Key name. This name is for reference only. * @param cidr CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. <a href=\"http://software77.net/cidr-101.html\">More on CIDR blocks</a> * @param permissions Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"]. * @param enabled Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. * @param token OTP Token (YubiKey, Google Authenticator) - */ - public void aPIKeyNew (String name, String cidr, String permissions, Boolean enabled, String token, final Response.Listener responseListener, final Response.ErrorListener errorListener) { - Object postBody = null; - - - // create path and map variables - String path = "/apiKey".replaceAll("\\{format\\}","json"); - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - - - - String[] contentTypes = { - "application/json","application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - - if (name != null) { - localVarBuilder.addTextBody("name", ApiInvoker.parameterToString(name), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (cidr != null) { - localVarBuilder.addTextBody("cidr", ApiInvoker.parameterToString(cidr), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (permissions != null) { - localVarBuilder.addTextBody("permissions", ApiInvoker.parameterToString(permissions), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (enabled != null) { - localVarBuilder.addTextBody("enabled", ApiInvoker.parameterToString(enabled), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (token != null) { - localVarBuilder.addTextBody("token", ApiInvoker.parameterToString(token), ApiInvoker.TEXT_PLAIN_UTF8); - } - - - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("name", ApiInvoker.parameterToString(name)); -formParams.put("cidr", ApiInvoker.parameterToString(cidr)); -formParams.put("permissions", ApiInvoker.parameterToString(permissions)); -formParams.put("enabled", ApiInvoker.parameterToString(enabled)); -formParams.put("token", ApiInvoker.parameterToString(token)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, - new Response.Listener() { - @Override - public void onResponse(String localVarResponse) { - try { - responseListener.onResponse((APIKey) ApiInvoker.deserialize(localVarResponse, "", APIKey.class)); - } catch (ApiException exception) { - errorListener.onErrorResponse(new VolleyError(exception)); - } - } - }, new Response.ErrorListener() { - @Override - public void onErrorResponse(VolleyError error) { - errorListener.onErrorResponse(error); - } - }); - } catch (ApiException ex) { - errorListener.onErrorResponse(new VolleyError(ex)); - } - } - /** - * Remove an API Key. - * - * @param apiKeyID API Key ID (public component). - * @return InlineResponse200 - */ - public InlineResponse200 aPIKeyRemove (String apiKeyID) throws TimeoutException, ExecutionException, InterruptedException, ApiException { - Object postBody = null; - // verify the required parameter 'apiKeyID' is set - if (apiKeyID == null) { - VolleyError error = new VolleyError("Missing the required parameter 'apiKeyID' when calling aPIKeyRemove", - new ApiException(400, "Missing the required parameter 'apiKeyID' when calling aPIKeyRemove")); - } - - // create path and map variables - String path = "/apiKey"; - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - String[] contentTypes = { - "application/json", - "application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (apiKeyID != null) { - localVarBuilder.addTextBody("apiKeyID", ApiInvoker.parameterToString(apiKeyID), ApiInvoker.TEXT_PLAIN_UTF8); - } - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("apiKeyID", ApiInvoker.parameterToString(apiKeyID)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - String localVarResponse = apiInvoker.invokeAPI (basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames); - if (localVarResponse != null) { - return (InlineResponse200) ApiInvoker.deserialize(localVarResponse, "", InlineResponse200.class); - } else { - return null; - } - } catch (ApiException ex) { - throw ex; - } catch (InterruptedException ex) { - throw ex; - } catch (ExecutionException ex) { - if (ex.getCause() instanceof VolleyError) { - VolleyError volleyError = (VolleyError)ex.getCause(); - if (volleyError.networkResponse != null) { - throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage()); - } - } - throw ex; - } catch (TimeoutException ex) { - throw ex; - } - } - - /** - * Remove an API Key. - * - * @param apiKeyID API Key ID (public component). - */ - public void aPIKeyRemove (String apiKeyID, final Response.Listener responseListener, final Response.ErrorListener errorListener) { - Object postBody = null; - - // verify the required parameter 'apiKeyID' is set - if (apiKeyID == null) { - VolleyError error = new VolleyError("Missing the required parameter 'apiKeyID' when calling aPIKeyRemove", - new ApiException(400, "Missing the required parameter 'apiKeyID' when calling aPIKeyRemove")); - } - - // create path and map variables - String path = "/apiKey".replaceAll("\\{format\\}","json"); - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - - - - String[] contentTypes = { - "application/json","application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - - if (apiKeyID != null) { - localVarBuilder.addTextBody("apiKeyID", ApiInvoker.parameterToString(apiKeyID), ApiInvoker.TEXT_PLAIN_UTF8); - } - - - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("apiKeyID", ApiInvoker.parameterToString(apiKeyID)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames, - new Response.Listener() { - @Override - public void onResponse(String localVarResponse) { - try { - responseListener.onResponse((InlineResponse200) ApiInvoker.deserialize(localVarResponse, "", InlineResponse200.class)); - } catch (ApiException exception) { - errorListener.onErrorResponse(new VolleyError(exception)); - } - } - }, new Response.ErrorListener() { - @Override - public void onErrorResponse(VolleyError error) { - errorListener.onErrorResponse(error); - } - }); - } catch (ApiException ex) { - errorListener.onErrorResponse(new VolleyError(ex)); - } - } } diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/AnnouncementApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/AnnouncementApi.java index e4dbc7cfa..e6c3ca83f 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/AnnouncementApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/AnnouncementApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -37,7 +37,7 @@ import java.util.concurrent.TimeoutException; public class AnnouncementApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -209,7 +209,7 @@ public List announcementGetUrgent () throws TimeoutException, Exec // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -272,7 +272,7 @@ public void announcementGetUrgent (final Response.Listener> r // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/ChatApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/ChatApi.java index 5d256128b..a71e702af 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/ChatApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/ChatApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -40,7 +40,7 @@ import java.util.concurrent.TimeoutException; public class ChatApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -472,7 +472,7 @@ public Chat chatNew (String message, Double channelID) throws TimeoutException, formParams.put("channelID", ApiInvoker.parameterToString(channelID)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -550,7 +550,7 @@ public void chatNew (String message, Double channelID, final Response.Listener executionGet (String symbol, String filter, String column // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -135,7 +135,7 @@ public List executionGet (String symbol, String filter, String column /** * Get all raw executions for your account. * This returns all raw transactions, which includes order opening and cancelation, and order status changes. It can be quite noisy. More focused information is available at `/execution/tradeHistory`. You may also use the `filter` param to target your query. Specify an array as a filter value, such as `{\"execType\": [\"Settlement\", \"Trade\"]}` to filter on multiple values. See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_8_8.html) for explanations of these fields. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void executionGet (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -177,7 +177,7 @@ public void executionGet (String symbol, String filter, String columns, BigDecim // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -203,7 +203,7 @@ public void onErrorResponse(VolleyError error) { /** * Get all balance-affecting executions. This includes each trade, insurance charge, and settlement. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -248,7 +248,7 @@ public List executionGetTradeHistory (String symbol, String filter, S // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -277,7 +277,7 @@ public List executionGetTradeHistory (String symbol, String filter, S /** * Get all balance-affecting executions. This includes each trade, insurance charge, and settlement. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void executionGetTradeHistory (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -319,7 +319,7 @@ public void executionGetTradeHistory (String symbol, String filter, String colum // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/FundingApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/FundingApi.java index 3f0ba5d15..0abe7be36 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/FundingApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/FundingApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -39,7 +39,7 @@ import java.util.concurrent.TimeoutException; public class FundingApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -61,7 +61,7 @@ public String getBasePath() { /** * Get funding history. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -135,7 +135,7 @@ public List fundingGet (String symbol, String filter, String columns, B /** * Get funding history. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void fundingGet (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/NotificationApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/GlobalNotificationApi.java similarity index 64% rename from auto-generated/android/src/main/java/io/swagger/client/api/NotificationApi.java rename to auto-generated/android/src/main/java/io/swagger/client/api/GlobalNotificationApi.java index 0ee41fcd7..b7284eb67 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/NotificationApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/GlobalNotificationApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -24,7 +24,7 @@ import com.android.volley.VolleyError; import io.swagger.client.model.Error; -import io.swagger.client.model.Notification; +import io.swagger.client.model.GlobalNotification; import org.apache.http.HttpEntity; import org.apache.http.entity.mime.MultipartEntityBuilder; @@ -36,8 +36,8 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; -public class NotificationApi { - String basePath = "https://localhost/api/v1"; +public class GlobalNotificationApi { + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -57,15 +57,15 @@ public String getBasePath() { } /** - * Get your current notifications. + * Get your current GlobalNotifications. * This is an upcoming feature and currently does not return data. - * @return List + * @return List */ - public List notificationGet () throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public List globalNotificationGet () throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/notification"; + String path = "/globalNotification"; // query params List queryParams = new ArrayList(); @@ -88,12 +88,12 @@ public List notificationGet () throws TimeoutException, ExecutionE // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (List) ApiInvoker.deserialize(localVarResponse, "array", Notification.class); + return (List) ApiInvoker.deserialize(localVarResponse, "array", GlobalNotification.class); } else { return null; } @@ -115,16 +115,16 @@ public List notificationGet () throws TimeoutException, ExecutionE } /** - * Get your current notifications. + * Get your current GlobalNotifications. * This is an upcoming feature and currently does not return data. */ - public void notificationGet (final Response.Listener> responseListener, final Response.ErrorListener errorListener) { + public void globalNotificationGet (final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/notification".replaceAll("\\{format\\}","json"); + String path = "/globalNotification".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -151,7 +151,7 @@ public void notificationGet (final Response.Listener> respons // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -159,7 +159,7 @@ public void notificationGet (final Response.Listener> respons @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((List) ApiInvoker.deserialize(localVarResponse, "array", Notification.class)); + responseListener.onResponse((List) ApiInvoker.deserialize(localVarResponse, "array", GlobalNotification.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/InstrumentApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/InstrumentApi.java index 79d043e28..7d0418a35 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/InstrumentApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/InstrumentApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -41,7 +41,7 @@ import java.util.concurrent.TimeoutException; public class InstrumentApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -63,7 +63,7 @@ public String getBasePath() { /** * Get instruments. * This returns all instruments and indices, including those that have settled or are unlisted. Use this endpoint if you want to query for individual instruments or use a complex filter. Use `/instrument/active` to return active instruments, or use a filter like `{\"state\": \"Open\"}`. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -137,7 +137,7 @@ public List instrumentGet (String symbol, String filter, String colu /** * Get instruments. * This returns all instruments and indices, including those that have settled or are unlisted. Use this endpoint if you want to query for individual instruments or use a complex filter. Use `/instrument/active` to return active instruments, or use a filter like `{\"state\": \"Open\"}`. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void instrumentGet (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -440,7 +440,7 @@ public void onErrorResponse(VolleyError error) { } /** * Return all active contract series and interval pairs. - * This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. + * This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. * @return InstrumentInterval */ public InstrumentInterval instrumentGetActiveIntervals () throws TimeoutException, ExecutionException, InterruptedException, ApiException { @@ -498,7 +498,7 @@ public InstrumentInterval instrumentGetActiveIntervals () throws TimeoutExceptio /** * Return all active contract series and interval pairs. - * This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. + * This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. */ public void instrumentGetActiveIntervals (final Response.Listener responseListener, final Response.ErrorListener errorListener) { @@ -559,7 +559,6 @@ public void onErrorResponse(VolleyError error) { /** * Show constituent parts of an index. * Composite indices are built from multiple external price sources. Use this endpoint to get the underlying prices of an index. For example, send a `symbol` of `.XBT` to get the ticks and weights of the constituent exchanges that build the \".XBT\" index. A tick with reference `\"BMI\"` and weight `null` is the composite index tick. - * @param account * @param symbol The composite index symbol. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. @@ -570,7 +569,7 @@ public void onErrorResponse(VolleyError error) { * @param endTime Ending date filter for results. * @return List */ - public List instrumentGetCompositeIndex (Double account, String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public List instrumentGetCompositeIndex (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables @@ -582,7 +581,6 @@ public List instrumentGetCompositeIndex (Double account, String Map headerParams = new HashMap(); // form params Map formParams = new HashMap(); - queryParams.addAll(ApiInvoker.parameterToPairs("", "account", account)); queryParams.addAll(ApiInvoker.parameterToPairs("", "symbol", symbol)); queryParams.addAll(ApiInvoker.parameterToPairs("", "filter", filter)); queryParams.addAll(ApiInvoker.parameterToPairs("", "columns", columns)); @@ -635,9 +633,9 @@ public List instrumentGetCompositeIndex (Double account, String /** * Show constituent parts of an index. * Composite indices are built from multiple external price sources. Use this endpoint to get the underlying prices of an index. For example, send a `symbol` of `.XBT` to get the ticks and weights of the constituent exchanges that build the \".XBT\" index. A tick with reference `\"BMI\"` and weight `null` is the composite index tick. - * @param account * @param symbol The composite index symbol. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol The composite index symbol. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ - public void instrumentGetCompositeIndex (Double account, String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { + public void instrumentGetCompositeIndex (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -651,7 +649,6 @@ public void instrumentGetCompositeIndex (Double account, String symbol, String f // form params Map formParams = new HashMap(); - queryParams.addAll(ApiInvoker.parameterToPairs("", "account", account)); queryParams.addAll(ApiInvoker.parameterToPairs("", "symbol", symbol)); queryParams.addAll(ApiInvoker.parameterToPairs("", "filter", filter)); queryParams.addAll(ApiInvoker.parameterToPairs("", "columns", columns)); diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/InsuranceApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/InsuranceApi.java index 19788595d..cb19bf18f 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/InsuranceApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/InsuranceApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -39,7 +39,7 @@ import java.util.concurrent.TimeoutException; public class InsuranceApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -61,7 +61,7 @@ public String getBasePath() { /** * Get insurance fund history. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -135,7 +135,7 @@ public List insuranceGet (String symbol, String filter, String column /** * Get insurance fund history. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void insuranceGet (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/LeaderboardApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/LeaderboardApi.java index 9be6a9e84..124ff98a7 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/LeaderboardApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/LeaderboardApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -24,7 +24,7 @@ import com.android.volley.VolleyError; import io.swagger.client.model.Error; -import io.swagger.client.model.InlineResponse2001; +import io.swagger.client.model.InlineResponse200; import io.swagger.client.model.Leaderboard; import org.apache.http.HttpEntity; @@ -38,7 +38,7 @@ import java.util.concurrent.TimeoutException; public class LeaderboardApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -181,9 +181,9 @@ public void onErrorResponse(VolleyError error) { /** * Get your alias on the leaderboard. * - * @return InlineResponse2001 + * @return InlineResponse200 */ - public InlineResponse2001 leaderboardGetName () throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public InlineResponse200 leaderboardGetName () throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables @@ -210,12 +210,12 @@ public InlineResponse2001 leaderboardGetName () throws TimeoutException, Executi // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (InlineResponse2001) ApiInvoker.deserialize(localVarResponse, "", InlineResponse2001.class); + return (InlineResponse200) ApiInvoker.deserialize(localVarResponse, "", InlineResponse200.class); } else { return null; } @@ -241,7 +241,7 @@ public InlineResponse2001 leaderboardGetName () throws TimeoutException, Executi * */ - public void leaderboardGetName (final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void leaderboardGetName (final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -273,7 +273,7 @@ public void leaderboardGetName (final Response.Listener resp // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -281,7 +281,7 @@ public void leaderboardGetName (final Response.Listener resp @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((InlineResponse2001) ApiInvoker.deserialize(localVarResponse, "", InlineResponse2001.class)); + responseListener.onResponse((InlineResponse200) ApiInvoker.deserialize(localVarResponse, "", InlineResponse200.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/LiquidationApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/LiquidationApi.java index e3930e4b3..eb95e188c 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/LiquidationApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/LiquidationApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -39,7 +39,7 @@ import java.util.concurrent.TimeoutException; public class LiquidationApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -61,7 +61,7 @@ public String getBasePath() { /** * Get liquidation orders. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -135,7 +135,7 @@ public List liquidationGet (String symbol, String filter, String co /** * Get liquidation orders. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void liquidationGet (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/OrderApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/OrderApi.java index 7c0fffdd4..f338f2ad8 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/OrderApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/OrderApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -39,7 +39,7 @@ import java.util.concurrent.TimeoutException; public class OrderApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -60,13 +60,13 @@ public String getBasePath() { /** * Amend the quantity or price of an open order. - * Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Use the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts. These fields will round up to the nearest contract. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. + * Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. * @param orderID Order ID * @param origClOrdID Client Order ID. See POST /order. * @param clOrdID Optional new Client Order ID, requires `origClOrdID`. - * @param simpleOrderQty Optional order quantity in units of the underlying instrument (i.e. Bitcoin). + * @param simpleOrderQty Deprecated: simple orders are not supported after 2018/10/26 * @param orderQty Optional order quantity in units of the instrument (i.e. contracts). - * @param simpleLeavesQty Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. + * @param simpleLeavesQty Deprecated: simple orders are not supported after 2018/10/26 * @param leavesQty Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. * @param price Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param stopPx Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. @@ -145,7 +145,7 @@ public Order orderAmend (String orderID, String origClOrdID, String clOrdID, Dou formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -173,8 +173,8 @@ public Order orderAmend (String orderID, String origClOrdID, String clOrdID, Dou /** * Amend the quantity or price of an open order. - * Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Use the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts. These fields will round up to the nearest contract. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. - * @param orderID Order ID * @param origClOrdID Client Order ID. See POST /order. * @param clOrdID Optional new Client Order ID, requires `origClOrdID`. * @param simpleOrderQty Optional order quantity in units of the underlying instrument (i.e. Bitcoin). * @param orderQty Optional order quantity in units of the instrument (i.e. contracts). * @param simpleLeavesQty Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. * @param leavesQty Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. * @param price Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param stopPx Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. * @param pegOffsetValue Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. * @param text Optional amend annotation. e.g. 'Adjust skew'. + * Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. + * @param orderID Order ID * @param origClOrdID Client Order ID. See POST /order. * @param clOrdID Optional new Client Order ID, requires `origClOrdID`. * @param simpleOrderQty Deprecated: simple orders are not supported after 2018/10/26 * @param orderQty Optional order quantity in units of the instrument (i.e. contracts). * @param simpleLeavesQty Deprecated: simple orders are not supported after 2018/10/26 * @param leavesQty Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. * @param price Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param stopPx Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. * @param pegOffsetValue Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. * @param text Optional amend annotation. e.g. 'Adjust skew'. */ public void orderAmend (String orderID, String origClOrdID, String clOrdID, Double simpleOrderQty, BigDecimal orderQty, Double simpleLeavesQty, BigDecimal leavesQty, Double price, Double stopPx, Double pegOffsetValue, String text, final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -263,7 +263,7 @@ public void orderAmend (String orderID, String origClOrdID, String clOrdID, Doub formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -323,7 +323,7 @@ public List orderAmendBulk (String orders) throws TimeoutException, Execu formParams.put("orders", ApiInvoker.parameterToString(orders)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -391,7 +391,7 @@ public void orderAmendBulk (String orders, final Response.Listener> formParams.put("orders", ApiInvoker.parameterToString(orders)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -461,7 +461,7 @@ public List orderCancel (String orderID, String clOrdID, String text) thr formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -539,7 +539,7 @@ public void orderCancel (String orderID, String clOrdID, String text, final Resp formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -609,7 +609,7 @@ public List orderCancelAll (String symbol, String filter, String text) th formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -687,7 +687,7 @@ public void orderCancelAll (String symbol, String filter, String text, final Res formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -752,7 +752,7 @@ public Object orderCancelAllAfter (Double timeout) throws TimeoutException, Exec formParams.put("timeout", ApiInvoker.parameterToString(timeout)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -825,7 +825,7 @@ public void orderCancelAllAfter (Double timeout, final Response.Listener formParams.put("timeout", ApiInvoker.parameterToString(timeout)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -895,7 +895,7 @@ public Order orderClosePosition (String symbol, Double price) throws TimeoutExce formParams.put("price", ApiInvoker.parameterToString(price)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -973,7 +973,7 @@ public void orderClosePosition (String symbol, Double price, final Response.List formParams.put("price", ApiInvoker.parameterToString(price)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -999,7 +999,7 @@ public void onErrorResponse(VolleyError error) { /** * Get your orders. * To get open orders only, send {\"open\": true} in the filter param. See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_D_68.html\">the FIX Spec</a> for explanations of these fields. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -1044,7 +1044,7 @@ public List orderGetOrders (String symbol, String filter, String columns, // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -1073,7 +1073,7 @@ public List orderGetOrders (String symbol, String filter, String columns, /** * Get your orders. * To get open orders only, send {\"open\": true} in the filter param. See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_D_68.html\">the FIX Spec</a> for explanations of these fields. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void orderGetOrders (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -1115,7 +1115,7 @@ public void orderGetOrders (String symbol, String filter, String columns, BigDec // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -1140,22 +1140,22 @@ public void onErrorResponse(VolleyError error) { } /** * Create a new order. - * ## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: * **Limit**: The default order type. Specify an `orderQty` and `price`. * **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. * **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as permitted by available margin, will become a limit order. The difference between this type and `Market` only affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining quantity in the books as a `Limit`. * **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. * `Close` Stops don't require an `orderQty`. See Execution Instructions below. * **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. * **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. * **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). * **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. * **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill. * **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. * **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first. * **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. Please follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing. BitMEX offers four advanced Linked Order types: * **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique. Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`. * **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes. * **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended down by the execution quantity. * **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally by the fill percentage. #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities Send a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency. This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is. #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` + * ## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: - **Limit**: The default order type. Specify an `orderQty` and `price`. - **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. - **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. - `Close` Stops don't require an `orderQty`. See Execution Instructions below. - **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. - **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. - **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). - **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. - **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. - **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first. - **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders [Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/) #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities [Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/) #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` * @param symbol Instrument symbol. e.g. 'XBTUSD'. - * @param side Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. - * @param simpleOrderQty Order quantity in units of the underlying instrument (i.e. Bitcoin). + * @param side Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative. + * @param simpleOrderQty Deprecated: simple orders are not supported after 2018/10/26 * @param orderQty Order quantity in units of the instrument (i.e. contracts). * @param price Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param displayQty Optional quantity to display in the book. Use 0 for a fully hidden order. * @param stopPx Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. * @param clOrdID Optional Client Order ID. This clOrdID will come back on the order and any related executions. - * @param clOrdLinkID Optional Client Order Link ID for contingent orders. + * @param clOrdLinkID Deprecated: linked orders are not supported after 2018/11/10. * @param pegOffsetValue Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. * @param pegPriceType Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. - * @param ordType Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. - * @param timeInForce Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. + * @param ordType Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. + * @param timeInForce Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param execInst Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. - * @param contingencyType Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. + * @param contingencyType Deprecated: linked orders are not supported after 2018/11/10. * @param text Optional order annotation. e.g. 'Take profit'. * @return Order */ @@ -1255,7 +1255,7 @@ public Order orderNew (String symbol, String side, Double simpleOrderQty, BigDec formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -1283,8 +1283,8 @@ public Order orderNew (String symbol, String side, Double simpleOrderQty, BigDec /** * Create a new order. - * ## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: * **Limit**: The default order type. Specify an `orderQty` and `price`. * **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. * **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as permitted by available margin, will become a limit order. The difference between this type and `Market` only affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining quantity in the books as a `Limit`. * **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. * `Close` Stops don't require an `orderQty`. See Execution Instructions below. * **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. * **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. * **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). * **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. * **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill. * **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. * **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first. * **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. Please follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing. BitMEX offers four advanced Linked Order types: * **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique. Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`. * **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes. * **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended down by the execution quantity. * **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally by the fill percentage. #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities Send a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency. This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is. #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` - * @param symbol Instrument symbol. e.g. 'XBTUSD'. * @param side Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. * @param simpleOrderQty Order quantity in units of the underlying instrument (i.e. Bitcoin). * @param orderQty Order quantity in units of the instrument (i.e. contracts). * @param price Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param displayQty Optional quantity to display in the book. Use 0 for a fully hidden order. * @param stopPx Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. * @param clOrdID Optional Client Order ID. This clOrdID will come back on the order and any related executions. * @param clOrdLinkID Optional Client Order Link ID for contingent orders. * @param pegOffsetValue Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. * @param pegPriceType Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. * @param ordType Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. * @param timeInForce Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. * @param execInst Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. * @param contingencyType Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. * @param text Optional order annotation. e.g. 'Take profit'. + * ## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: - **Limit**: The default order type. Specify an `orderQty` and `price`. - **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. - **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. - `Close` Stops don't require an `orderQty`. See Execution Instructions below. - **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. - **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. - **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). - **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. - **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. - **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first. - **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders [Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/) #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities [Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/) #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` + * @param symbol Instrument symbol. e.g. 'XBTUSD'. * @param side Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative. * @param simpleOrderQty Deprecated: simple orders are not supported after 2018/10/26 * @param orderQty Order quantity in units of the instrument (i.e. contracts). * @param price Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param displayQty Optional quantity to display in the book. Use 0 for a fully hidden order. * @param stopPx Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. * @param clOrdID Optional Client Order ID. This clOrdID will come back on the order and any related executions. * @param clOrdLinkID Deprecated: linked orders are not supported after 2018/11/10. * @param pegOffsetValue Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. * @param pegPriceType Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. * @param ordType Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. * @param timeInForce Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. * @param execInst Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. * @param contingencyType Deprecated: linked orders are not supported after 2018/11/10. * @param text Optional order annotation. e.g. 'Take profit'. */ public void orderNew (String symbol, String side, Double simpleOrderQty, BigDecimal orderQty, Double price, BigDecimal displayQty, Double stopPx, String clOrdID, String clOrdLinkID, Double pegOffsetValue, String pegPriceType, String ordType, String timeInForce, String execInst, String contingencyType, String text, final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -1403,7 +1403,7 @@ public void orderNew (String symbol, String side, Double simpleOrderQty, BigDeci formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -1428,7 +1428,7 @@ public void onErrorResponse(VolleyError error) { } /** * Create multiple new orders for the same symbol. - * This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. + * This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. * @param orders An array of orders. * @return List */ @@ -1463,7 +1463,7 @@ public List orderNewBulk (String orders) throws TimeoutException, Executi formParams.put("orders", ApiInvoker.parameterToString(orders)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -1491,7 +1491,7 @@ public List orderNewBulk (String orders) throws TimeoutException, Executi /** * Create multiple new orders for the same symbol. - * This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. + * This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. * @param orders An array of orders. */ public void orderNewBulk (String orders, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { @@ -1531,7 +1531,7 @@ public void orderNewBulk (String orders, final Response.Listener> re formParams.put("orders", ApiInvoker.parameterToString(orders)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/OrderBookApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/OrderBookApi.java index a6de2ef83..01ed6d661 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/OrderBookApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/OrderBookApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -38,7 +38,7 @@ import java.util.concurrent.TimeoutException; public class OrderBookApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/PositionApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/PositionApi.java index b5b25de1b..b127507b9 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/PositionApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/PositionApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -38,7 +38,7 @@ import java.util.concurrent.TimeoutException; public class PositionApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -59,7 +59,7 @@ public String getBasePath() { /** * Get your positions. - * See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html\">the FIX Spec</a> for explanations of these fields. + * This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below. The fields _account_, _symbol_, _currency_ are unique to each position and form its key. - **account**: Your unique account ID. - **symbol**: The contract for this position. - **currency**: The margin currency for this position. - **underlying**: Meta data of the _symbol_. - **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_ - **commission**: The maximum of the maker, taker, and settlement fee. - **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage. - **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit. - **riskLimit**: This is a function of your _maintMarginReq_. - **leverage**: 1 / initMarginReq. - **crossMargin**: True/false depending on whether you set cross margin on this position. - **deleveragePercentile**: Indicates where your position is in the ADL queue. - **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position. - **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed. - **currentQty**: The current position amount in contracts. - **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_). - **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_). - **realisedCost**: The realised cost of this position calculated with regard to average cost accounting. - **unrealisedCost**: _currentCost_ - _realisedCost_. - **grossOpenCost**: The absolute value of your open orders for this symbol. - **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_). - **markPrice**: The mark price of the symbol in _quoteCurrency_. - **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_). - **homeNotional**: Value of position in units of _underlying_. - **foreignNotional**: Value of position in units of _quoteCurrency_. - **realisedPnl**: The negative of _realisedCost_. - **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_. - **unrealisedPnl**: _unrealisedGrossPnl_. - **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated. - **bankruptPrice**: Once markPrice reaches this price, this position will have no equity. * @param filter Table filter. For example, send {\"symbol\": \"XBTUSD\"}. * @param columns Which columns to fetch. For example, send [\"columnName\"]. * @param count Number of rows to fetch. @@ -95,7 +95,7 @@ public List positionGet (String filter, String columns, BigDecimal cou // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -123,7 +123,7 @@ public List positionGet (String filter, String columns, BigDecimal cou /** * Get your positions. - * See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html\">the FIX Spec</a> for explanations of these fields. + * This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below. The fields _account_, _symbol_, _currency_ are unique to each position and form its key. - **account**: Your unique account ID. - **symbol**: The contract for this position. - **currency**: The margin currency for this position. - **underlying**: Meta data of the _symbol_. - **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_ - **commission**: The maximum of the maker, taker, and settlement fee. - **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage. - **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit. - **riskLimit**: This is a function of your _maintMarginReq_. - **leverage**: 1 / initMarginReq. - **crossMargin**: True/false depending on whether you set cross margin on this position. - **deleveragePercentile**: Indicates where your position is in the ADL queue. - **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position. - **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed. - **currentQty**: The current position amount in contracts. - **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_). - **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_). - **realisedCost**: The realised cost of this position calculated with regard to average cost accounting. - **unrealisedCost**: _currentCost_ - _realisedCost_. - **grossOpenCost**: The absolute value of your open orders for this symbol. - **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_). - **markPrice**: The mark price of the symbol in _quoteCurrency_. - **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_). - **homeNotional**: Value of position in units of _underlying_. - **foreignNotional**: Value of position in units of _quoteCurrency_. - **realisedPnl**: The negative of _realisedCost_. - **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_. - **unrealisedPnl**: _unrealisedGrossPnl_. - **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated. - **bankruptPrice**: Once markPrice reaches this price, this position will have no equity. * @param filter Table filter. For example, send {\"symbol\": \"XBTUSD\"}. * @param columns Which columns to fetch. For example, send [\"columnName\"]. * @param count Number of rows to fetch. */ public void positionGet (String filter, String columns, BigDecimal count, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { @@ -161,7 +161,7 @@ public void positionGet (String filter, String columns, BigDecimal count, final // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -231,7 +231,7 @@ public Position positionIsolateMargin (String symbol, Boolean enabled) throws Ti formParams.put("enabled", ApiInvoker.parameterToString(enabled)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -309,7 +309,7 @@ public void positionIsolateMargin (String symbol, Boolean enabled, final Respons formParams.put("enabled", ApiInvoker.parameterToString(enabled)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -384,7 +384,7 @@ public Position positionTransferIsolatedMargin (String symbol, BigDecimal amount formParams.put("amount", ApiInvoker.parameterToString(amount)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -467,7 +467,7 @@ public void positionTransferIsolatedMargin (String symbol, BigDecimal amount, fi formParams.put("amount", ApiInvoker.parameterToString(amount)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -542,7 +542,7 @@ public Position positionUpdateLeverage (String symbol, Double leverage) throws T formParams.put("leverage", ApiInvoker.parameterToString(leverage)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -625,7 +625,7 @@ public void positionUpdateLeverage (String symbol, Double leverage, final Respon formParams.put("leverage", ApiInvoker.parameterToString(leverage)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -700,7 +700,7 @@ public Position positionUpdateRiskLimit (String symbol, BigDecimal riskLimit) th formParams.put("riskLimit", ApiInvoker.parameterToString(riskLimit)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -783,7 +783,7 @@ public void positionUpdateRiskLimit (String symbol, BigDecimal riskLimit, final formParams.put("riskLimit", ApiInvoker.parameterToString(riskLimit)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/QuoteApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/QuoteApi.java index b584635fe..bdec7b44c 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/QuoteApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/QuoteApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -39,7 +39,7 @@ import java.util.concurrent.TimeoutException; public class QuoteApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -61,7 +61,7 @@ public String getBasePath() { /** * Get Quotes. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -135,7 +135,7 @@ public List quoteGet (String symbol, String filter, String columns, BigDe /** * Get Quotes. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void quoteGet (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -202,10 +202,10 @@ public void onErrorResponse(VolleyError error) { } /** * Get previous quotes in time buckets. - * + * Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. * @param binSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. * @param partial If true, will send in-progress (incomplete) bins for the current time period. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -280,8 +280,8 @@ public List quoteGetBucketed (String binSize, Boolean partial, String sym /** * Get previous quotes in time buckets. - * - * @param binSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. * @param partial If true, will send in-progress (incomplete) bins for the current time period. * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. + * @param binSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. * @param partial If true, will send in-progress (incomplete) bins for the current time period. * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void quoteGetBucketed (String binSize, Boolean partial, String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/SchemaApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/SchemaApi.java index 014327651..62726054a 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/SchemaApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/SchemaApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -36,7 +36,7 @@ import java.util.concurrent.TimeoutException; public class SchemaApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/SettlementApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/SettlementApi.java index ec224b21e..ec642c447 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/SettlementApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/SettlementApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -39,7 +39,7 @@ import java.util.concurrent.TimeoutException; public class SettlementApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -61,7 +61,7 @@ public String getBasePath() { /** * Get settlement history. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -135,7 +135,7 @@ public List settlementGet (String symbol, String filter, String colu /** * Get settlement history. * - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void settlementGet (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/StatsApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/StatsApi.java index 3e392c4b1..fff9e0ebc 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/StatsApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/StatsApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -39,7 +39,7 @@ import java.util.concurrent.TimeoutException; public class StatsApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/TradeApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/TradeApi.java index b24655046..f9063e626 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/TradeApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/TradeApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -40,7 +40,7 @@ import java.util.concurrent.TimeoutException; public class TradeApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -62,7 +62,7 @@ public String getBasePath() { /** * Get Trades. * Please note that indices (symbols starting with `.`) post trades at intervals to the trade feed. These have a `size` of 0 and are used only to indicate a changing price. See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AE_6569.html) for explanations of these fields. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -136,7 +136,7 @@ public List tradeGet (String symbol, String filter, String columns, BigDe /** * Get Trades. * Please note that indices (symbols starting with `.`) post trades at intervals to the trade feed. These have a `size` of 0 and are used only to indicate a changing price. See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AE_6569.html) for explanations of these fields. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void tradeGet (String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; @@ -203,10 +203,10 @@ public void onErrorResponse(VolleyError error) { } /** * Get previous trades in time buckets. - * + * Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. Also note the `open` price is equal to the `close` price of the previous timeframe bucket. * @param binSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. * @param partial If true, will send in-progress (incomplete) bins for the current time period. - * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. + * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. @@ -281,8 +281,8 @@ public List tradeGetBucketed (String binSize, Boolean partial, String /** * Get previous trades in time buckets. - * - * @param binSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. * @param partial If true, will send in-progress (incomplete) bins for the current time period. * @param symbol Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. + * Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. Also note the `open` price is equal to the `close` price of the previous timeframe bucket. + * @param binSize Time interval to bucket by. Available options: [1m,5m,1h,1d]. * @param partial If true, will send in-progress (incomplete) bins for the current time period. * @param symbol Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. * @param filter Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. * @param columns Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. * @param count Number of results to fetch. * @param start Starting point for results. * @param reverse If true, will sort results newest first. * @param startTime Starting date filter for results. * @param endTime Ending date filter for results. */ public void tradeGetBucketed (String binSize, Boolean partial, String symbol, String filter, String columns, BigDecimal count, BigDecimal start, Boolean reverse, Date startTime, Date endTime, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/UserApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/UserApi.java index 20b2d23a4..d670fe0c8 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/api/UserApi.java +++ b/auto-generated/android/src/main/java/io/swagger/client/api/UserApi.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -26,10 +26,14 @@ import io.swagger.client.model.AccessToken; import io.swagger.client.model.Affiliate; import java.math.BigDecimal; +import io.swagger.client.model.CommunicationToken; +import java.util.Date; +import io.swagger.client.model.Error; import io.swagger.client.model.Margin; +import io.swagger.client.model.QuoteFillRatio; import io.swagger.client.model.Transaction; import io.swagger.client.model.User; -import io.swagger.client.model.UserCommission; +import io.swagger.client.model.UserCommissionsBySymbol; import io.swagger.client.model.Wallet; import org.apache.http.HttpEntity; @@ -43,7 +47,7 @@ import java.util.concurrent.TimeoutException; public class UserApi { - String basePath = "https://localhost/api/v1"; + String basePath = "https://www.bitmex.com/api/v1"; ApiInvoker apiInvoker = ApiInvoker.getInstance(); public void addHeader(String key, String value) { @@ -202,7 +206,7 @@ public void onErrorResponse(VolleyError error) { } /** * Check if a referral code is valid. - * If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404. + * If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid. * @param referralCode * @return Double */ @@ -262,7 +266,7 @@ public Double userCheckReferralCode (String referralCode) throws TimeoutExceptio /** * Check if a referral code is valid. - * If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404. + * If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid. * @param referralCode */ public void userCheckReferralCode (String referralCode, final Response.Listener responseListener, final Response.ErrorListener errorListener) { @@ -322,21 +326,27 @@ public void onErrorResponse(VolleyError error) { } } /** - * Confirm your email address with a token. + * Register your communication token for mobile clients * * @param token - * @return AccessToken + * @param platformAgent + * @return List */ - public AccessToken userConfirm (String token) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public List userCommunicationToken (String token, String platformAgent) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // verify the required parameter 'token' is set if (token == null) { - VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userConfirm", - new ApiException(400, "Missing the required parameter 'token' when calling userConfirm")); + VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userCommunicationToken", + new ApiException(400, "Missing the required parameter 'token' when calling userCommunicationToken")); + } + // verify the required parameter 'platformAgent' is set + if (platformAgent == null) { + VolleyError error = new VolleyError("Missing the required parameter 'platformAgent' when calling userCommunicationToken", + new ApiException(400, "Missing the required parameter 'platformAgent' when calling userCommunicationToken")); } // create path and map variables - String path = "/user/confirmEmail"; + String path = "/user/communicationToken"; // query params List queryParams = new ArrayList(); @@ -356,19 +366,23 @@ public AccessToken userConfirm (String token) throws TimeoutException, Execution if (token != null) { localVarBuilder.addTextBody("token", ApiInvoker.parameterToString(token), ApiInvoker.TEXT_PLAIN_UTF8); } + if (platformAgent != null) { + localVarBuilder.addTextBody("platformAgent", ApiInvoker.parameterToString(platformAgent), ApiInvoker.TEXT_PLAIN_UTF8); + } HttpEntity httpEntity = localVarBuilder.build(); postBody = httpEntity; } else { // normal form params formParams.put("token", ApiInvoker.parameterToString(token)); + formParams.put("platformAgent", ApiInvoker.parameterToString(platformAgent)); } - String[] authNames = new String[] { }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (AccessToken) ApiInvoker.deserialize(localVarResponse, "", AccessToken.class); + return (List) ApiInvoker.deserialize(localVarResponse, "array", CommunicationToken.class); } else { return null; } @@ -390,21 +404,26 @@ public AccessToken userConfirm (String token) throws TimeoutException, Execution } /** - * Confirm your email address with a token. + * Register your communication token for mobile clients * - * @param token + * @param token * @param platformAgent */ - public void userConfirm (String token, final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userCommunicationToken (String token, String platformAgent, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // verify the required parameter 'token' is set if (token == null) { - VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userConfirm", - new ApiException(400, "Missing the required parameter 'token' when calling userConfirm")); + VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userCommunicationToken", + new ApiException(400, "Missing the required parameter 'token' when calling userCommunicationToken")); + } + // verify the required parameter 'platformAgent' is set + if (platformAgent == null) { + VolleyError error = new VolleyError("Missing the required parameter 'platformAgent' when calling userCommunicationToken", + new ApiException(400, "Missing the required parameter 'platformAgent' when calling userCommunicationToken")); } // create path and map variables - String path = "/user/confirmEmail".replaceAll("\\{format\\}","json"); + String path = "/user/communicationToken".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -428,15 +447,20 @@ public void userConfirm (String token, final Response.Listener resp localVarBuilder.addTextBody("token", ApiInvoker.parameterToString(token), ApiInvoker.TEXT_PLAIN_UTF8); } + if (platformAgent != null) { + localVarBuilder.addTextBody("platformAgent", ApiInvoker.parameterToString(platformAgent), ApiInvoker.TEXT_PLAIN_UTF8); + } + HttpEntity httpEntity = localVarBuilder.build(); postBody = httpEntity; } else { // normal form params formParams.put("token", ApiInvoker.parameterToString(token)); +formParams.put("platformAgent", ApiInvoker.parameterToString(platformAgent)); } - String[] authNames = new String[] { }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -444,7 +468,7 @@ public void userConfirm (String token, final Response.Listener resp @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((AccessToken) ApiInvoker.deserialize(localVarResponse, "", AccessToken.class)); + responseListener.onResponse((List) ApiInvoker.deserialize(localVarResponse, "array", CommunicationToken.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } @@ -460,22 +484,21 @@ public void onErrorResponse(VolleyError error) { } } /** - * Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. + * Confirm your email address with a token. * - * @param token Token from your selected TFA type. - * @param type Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' - * @return Boolean + * @param token + * @return AccessToken */ - public Boolean userConfirmEnableTFA (String token, String type) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public AccessToken userConfirm (String token) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // verify the required parameter 'token' is set if (token == null) { - VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userConfirmEnableTFA", - new ApiException(400, "Missing the required parameter 'token' when calling userConfirmEnableTFA")); + VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userConfirm", + new ApiException(400, "Missing the required parameter 'token' when calling userConfirm")); } // create path and map variables - String path = "/user/confirmEnableTFA"; + String path = "/user/confirmEmail"; // query params List queryParams = new ArrayList(); @@ -492,9 +515,6 @@ public Boolean userConfirmEnableTFA (String token, String type) throws TimeoutEx if (contentType.startsWith("multipart/form-data")) { // file uploading MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (type != null) { - localVarBuilder.addTextBody("type", ApiInvoker.parameterToString(type), ApiInvoker.TEXT_PLAIN_UTF8); - } if (token != null) { localVarBuilder.addTextBody("token", ApiInvoker.parameterToString(token), ApiInvoker.TEXT_PLAIN_UTF8); } @@ -502,16 +522,15 @@ public Boolean userConfirmEnableTFA (String token, String type) throws TimeoutEx postBody = httpEntity; } else { // normal form params - formParams.put("type", ApiInvoker.parameterToString(type)); formParams.put("token", ApiInvoker.parameterToString(token)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (Boolean) ApiInvoker.deserialize(localVarResponse, "", Boolean.class); + return (AccessToken) ApiInvoker.deserialize(localVarResponse, "", AccessToken.class); } else { return null; } @@ -533,21 +552,21 @@ public Boolean userConfirmEnableTFA (String token, String type) throws TimeoutEx } /** - * Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. + * Confirm your email address with a token. * - * @param token Token from your selected TFA type. * @param type Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' + * @param token */ - public void userConfirmEnableTFA (String token, String type, final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userConfirm (String token, final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // verify the required parameter 'token' is set if (token == null) { - VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userConfirmEnableTFA", - new ApiException(400, "Missing the required parameter 'token' when calling userConfirmEnableTFA")); + VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userConfirm", + new ApiException(400, "Missing the required parameter 'token' when calling userConfirm")); } // create path and map variables - String path = "/user/confirmEnableTFA".replaceAll("\\{format\\}","json"); + String path = "/user/confirmEmail".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -567,10 +586,6 @@ public void userConfirmEnableTFA (String token, String type, final Response.List // file uploading MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (type != null) { - localVarBuilder.addTextBody("type", ApiInvoker.parameterToString(type), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (token != null) { localVarBuilder.addTextBody("token", ApiInvoker.parameterToString(token), ApiInvoker.TEXT_PLAIN_UTF8); } @@ -580,11 +595,10 @@ public void userConfirmEnableTFA (String token, String type, final Response.List postBody = httpEntity; } else { // normal form params - formParams.put("type", ApiInvoker.parameterToString(type)); -formParams.put("token", ApiInvoker.parameterToString(token)); + formParams.put("token", ApiInvoker.parameterToString(token)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -592,7 +606,7 @@ public void userConfirmEnableTFA (String token, String type, final Response.List @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((Boolean) ApiInvoker.deserialize(localVarResponse, "", Boolean.class)); + responseListener.onResponse((AccessToken) ApiInvoker.deserialize(localVarResponse, "", AccessToken.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } @@ -746,22 +760,15 @@ public void onErrorResponse(VolleyError error) { } } /** - * Disable two-factor auth for this account. + * Get your user model. * - * @param token Token from your selected TFA type. - * @param type Two-factor auth type. Supported types: 'GA' (Google Authenticator) - * @return Boolean + * @return User */ - public Boolean userDisableTFA (String token, String type) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public User userGet () throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; - // verify the required parameter 'token' is set - if (token == null) { - VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userDisableTFA", - new ApiException(400, "Missing the required parameter 'token' when calling userDisableTFA")); - } // create path and map variables - String path = "/user/disableTFA"; + String path = "/user"; // query params List queryParams = new ArrayList(); @@ -778,26 +785,18 @@ public Boolean userDisableTFA (String token, String type) throws TimeoutExceptio if (contentType.startsWith("multipart/form-data")) { // file uploading MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (type != null) { - localVarBuilder.addTextBody("type", ApiInvoker.parameterToString(type), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (token != null) { - localVarBuilder.addTextBody("token", ApiInvoker.parameterToString(token), ApiInvoker.TEXT_PLAIN_UTF8); - } HttpEntity httpEntity = localVarBuilder.build(); postBody = httpEntity; } else { // normal form params - formParams.put("type", ApiInvoker.parameterToString(type)); - formParams.put("token", ApiInvoker.parameterToString(token)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { - String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); + String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (Boolean) ApiInvoker.deserialize(localVarResponse, "", Boolean.class); + return (User) ApiInvoker.deserialize(localVarResponse, "", User.class); } else { return null; } @@ -819,21 +818,16 @@ public Boolean userDisableTFA (String token, String type) throws TimeoutExceptio } /** - * Disable two-factor auth for this account. + * Get your user model. * - * @param token Token from your selected TFA type. * @param type Two-factor auth type. Supported types: 'GA' (Google Authenticator) + */ - public void userDisableTFA (String token, String type, final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userGet (final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; - // verify the required parameter 'token' is set - if (token == null) { - VolleyError error = new VolleyError("Missing the required parameter 'token' when calling userDisableTFA", - new ApiException(400, "Missing the required parameter 'token' when calling userDisableTFA")); - } // create path and map variables - String path = "/user/disableTFA".replaceAll("\\{format\\}","json"); + String path = "/user".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -853,32 +847,22 @@ public void userDisableTFA (String token, String type, final Response.Listener() { @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((Boolean) ApiInvoker.deserialize(localVarResponse, "", Boolean.class)); + responseListener.onResponse((User) ApiInvoker.deserialize(localVarResponse, "", User.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } @@ -894,15 +878,15 @@ public void onErrorResponse(VolleyError error) { } } /** - * Get your user model. + * Get your current affiliate/referral status. * - * @return User + * @return Affiliate */ - public User userGet () throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public Affiliate userGetAffiliateStatus () throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/user"; + String path = "/user/affiliateStatus"; // query params List queryParams = new ArrayList(); @@ -925,12 +909,12 @@ public User userGet () throws TimeoutException, ExecutionException, InterruptedE // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (User) ApiInvoker.deserialize(localVarResponse, "", User.class); + return (Affiliate) ApiInvoker.deserialize(localVarResponse, "", Affiliate.class); } else { return null; } @@ -952,16 +936,16 @@ public User userGet () throws TimeoutException, ExecutionException, InterruptedE } /** - * Get your user model. + * Get your current affiliate/referral status. * */ - public void userGet (final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userGetAffiliateStatus (final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/user".replaceAll("\\{format\\}","json"); + String path = "/user/affiliateStatus".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -988,7 +972,7 @@ public void userGet (final Response.Listener responseListener, final Respo // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -996,7 +980,7 @@ public void userGet (final Response.Listener responseListener, final Respo @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((User) ApiInvoker.deserialize(localVarResponse, "", User.class)); + responseListener.onResponse((Affiliate) ApiInvoker.deserialize(localVarResponse, "", Affiliate.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } @@ -1012,15 +996,15 @@ public void onErrorResponse(VolleyError error) { } } /** - * Get your current affiliate/referral status. + * Get your account's commission status. * - * @return Affiliate + * @return UserCommissionsBySymbol */ - public Affiliate userGetAffiliateStatus () throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public UserCommissionsBySymbol userGetCommission () throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/user/affiliateStatus"; + String path = "/user/commission"; // query params List queryParams = new ArrayList(); @@ -1043,12 +1027,12 @@ public Affiliate userGetAffiliateStatus () throws TimeoutException, ExecutionExc // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (Affiliate) ApiInvoker.deserialize(localVarResponse, "", Affiliate.class); + return (UserCommissionsBySymbol) ApiInvoker.deserialize(localVarResponse, "", UserCommissionsBySymbol.class); } else { return null; } @@ -1070,16 +1054,16 @@ public Affiliate userGetAffiliateStatus () throws TimeoutException, ExecutionExc } /** - * Get your current affiliate/referral status. + * Get your account's commission status. * */ - public void userGetAffiliateStatus (final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userGetCommission (final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/user/affiliateStatus".replaceAll("\\{format\\}","json"); + String path = "/user/commission".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -1106,7 +1090,7 @@ public void userGetAffiliateStatus (final Response.Listener responseL // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -1114,7 +1098,7 @@ public void userGetAffiliateStatus (final Response.Listener responseL @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((Affiliate) ApiInvoker.deserialize(localVarResponse, "", Affiliate.class)); + responseListener.onResponse((UserCommissionsBySymbol) ApiInvoker.deserialize(localVarResponse, "", UserCommissionsBySymbol.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } @@ -1130,15 +1114,16 @@ public void onErrorResponse(VolleyError error) { } } /** - * Get your account's commission status. + * Get a deposit address. * - * @return List + * @param currency + * @return String */ - public List userGetCommission () throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public String userGetDepositAddress (String currency) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/user/commission"; + String path = "/user/depositAddress"; // query params List queryParams = new ArrayList(); @@ -1146,6 +1131,7 @@ public List userGetCommission () throws TimeoutException, Execut Map headerParams = new HashMap(); // form params Map formParams = new HashMap(); + queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" @@ -1161,12 +1147,12 @@ public List userGetCommission () throws TimeoutException, Execut // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (List) ApiInvoker.deserialize(localVarResponse, "array", UserCommission.class); + return (String) ApiInvoker.deserialize(localVarResponse, "", String.class); } else { return null; } @@ -1188,16 +1174,16 @@ public List userGetCommission () throws TimeoutException, Execut } /** - * Get your account's commission status. + * Get a deposit address. * - + * @param currency */ - public void userGetCommission (final Response.Listener> responseListener, final Response.ErrorListener errorListener) { + public void userGetDepositAddress (String currency, final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/user/commission".replaceAll("\\{format\\}","json"); + String path = "/user/depositAddress".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -1206,6 +1192,7 @@ public void userGetCommission (final Response.Listener> res // form params Map formParams = new HashMap(); + queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); String[] contentTypes = { @@ -1224,7 +1211,7 @@ public void userGetCommission (final Response.Listener> res // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -1232,7 +1219,7 @@ public void userGetCommission (final Response.Listener> res @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((List) ApiInvoker.deserialize(localVarResponse, "array", UserCommission.class)); + responseListener.onResponse((String) ApiInvoker.deserialize(localVarResponse, "", String.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } @@ -1248,16 +1235,27 @@ public void onErrorResponse(VolleyError error) { } } /** - * Get a deposit address. + * Get the execution history by day. * - * @param currency - * @return String + * @param symbol + * @param timestamp + * @return Object */ - public String userGetDepositAddress (String currency) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public Object userGetExecutionHistory (String symbol, Date timestamp) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; + // verify the required parameter 'symbol' is set + if (symbol == null) { + VolleyError error = new VolleyError("Missing the required parameter 'symbol' when calling userGetExecutionHistory", + new ApiException(400, "Missing the required parameter 'symbol' when calling userGetExecutionHistory")); + } + // verify the required parameter 'timestamp' is set + if (timestamp == null) { + VolleyError error = new VolleyError("Missing the required parameter 'timestamp' when calling userGetExecutionHistory", + new ApiException(400, "Missing the required parameter 'timestamp' when calling userGetExecutionHistory")); + } // create path and map variables - String path = "/user/depositAddress"; + String path = "/user/executionHistory"; // query params List queryParams = new ArrayList(); @@ -1265,7 +1263,8 @@ public String userGetDepositAddress (String currency) throws TimeoutException, E Map headerParams = new HashMap(); // form params Map formParams = new HashMap(); - queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "symbol", symbol)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "timestamp", timestamp)); String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" @@ -1281,12 +1280,12 @@ public String userGetDepositAddress (String currency) throws TimeoutException, E // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (String) ApiInvoker.deserialize(localVarResponse, "", String.class); + return (Object) ApiInvoker.deserialize(localVarResponse, "", Object.class); } else { return null; } @@ -1308,16 +1307,26 @@ public String userGetDepositAddress (String currency) throws TimeoutException, E } /** - * Get a deposit address. + * Get the execution history by day. * - * @param currency + * @param symbol * @param timestamp */ - public void userGetDepositAddress (String currency, final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userGetExecutionHistory (String symbol, Date timestamp, final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; + // verify the required parameter 'symbol' is set + if (symbol == null) { + VolleyError error = new VolleyError("Missing the required parameter 'symbol' when calling userGetExecutionHistory", + new ApiException(400, "Missing the required parameter 'symbol' when calling userGetExecutionHistory")); + } + // verify the required parameter 'timestamp' is set + if (timestamp == null) { + VolleyError error = new VolleyError("Missing the required parameter 'timestamp' when calling userGetExecutionHistory", + new ApiException(400, "Missing the required parameter 'timestamp' when calling userGetExecutionHistory")); + } // create path and map variables - String path = "/user/depositAddress".replaceAll("\\{format\\}","json"); + String path = "/user/executionHistory".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -1326,7 +1335,8 @@ public void userGetDepositAddress (String currency, final Response.Listener formParams = new HashMap(); - queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "symbol", symbol)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "timestamp", timestamp)); String[] contentTypes = { @@ -1345,7 +1355,7 @@ public void userGetDepositAddress (String currency, final Response.Listener resp // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -1490,16 +1500,15 @@ public void onErrorResponse(VolleyError error) { } } /** - * Get your current wallet information. + * Get 7 days worth of Quote Fill Ratio statistics. * - * @param currency - * @return Wallet + * @return QuoteFillRatio */ - public Wallet userGetWallet (String currency) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public QuoteFillRatio userGetQuoteFillRatio () throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/user/wallet"; + String path = "/user/quoteFillRatio"; // query params List queryParams = new ArrayList(); @@ -1507,7 +1516,6 @@ public Wallet userGetWallet (String currency) throws TimeoutException, Execution Map headerParams = new HashMap(); // form params Map formParams = new HashMap(); - queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" @@ -1523,12 +1531,12 @@ public Wallet userGetWallet (String currency) throws TimeoutException, Execution // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (Wallet) ApiInvoker.deserialize(localVarResponse, "", Wallet.class); + return (QuoteFillRatio) ApiInvoker.deserialize(localVarResponse, "", QuoteFillRatio.class); } else { return null; } @@ -1550,16 +1558,16 @@ public Wallet userGetWallet (String currency) throws TimeoutException, Execution } /** - * Get your current wallet information. + * Get 7 days worth of Quote Fill Ratio statistics. * - * @param currency + */ - public void userGetWallet (String currency, final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userGetQuoteFillRatio (final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/user/wallet".replaceAll("\\{format\\}","json"); + String path = "/user/quoteFillRatio".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -1568,7 +1576,6 @@ public void userGetWallet (String currency, final Response.Listener resp // form params Map formParams = new HashMap(); - queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); String[] contentTypes = { @@ -1587,7 +1594,7 @@ public void userGetWallet (String currency, final Response.Listener resp // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -1595,7 +1602,7 @@ public void userGetWallet (String currency, final Response.Listener resp @Override public void onResponse(String localVarResponse) { try { - responseListener.onResponse((Wallet) ApiInvoker.deserialize(localVarResponse, "", Wallet.class)); + responseListener.onResponse((QuoteFillRatio) ApiInvoker.deserialize(localVarResponse, "", QuoteFillRatio.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } @@ -1611,16 +1618,16 @@ public void onErrorResponse(VolleyError error) { } } /** - * Get a history of all of your wallet transactions (deposits, withdrawals, PNL). + * Get your current wallet information. * * @param currency - * @return List + * @return Wallet */ - public List userGetWalletHistory (String currency) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public Wallet userGetWallet (String currency) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/user/walletHistory"; + String path = "/user/wallet"; // query params List queryParams = new ArrayList(); @@ -1644,12 +1651,12 @@ public List userGetWalletHistory (String currency) throws TimeoutEx // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (List) ApiInvoker.deserialize(localVarResponse, "array", Transaction.class); + return (Wallet) ApiInvoker.deserialize(localVarResponse, "", Wallet.class); } else { return null; } @@ -1671,16 +1678,16 @@ public List userGetWalletHistory (String currency) throws TimeoutEx } /** - * Get a history of all of your wallet transactions (deposits, withdrawals, PNL). + * Get your current wallet information. * * @param currency */ - public void userGetWalletHistory (String currency, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { + public void userGetWallet (String currency, final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/user/walletHistory".replaceAll("\\{format\\}","json"); + String path = "/user/wallet".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -1708,7 +1715,7 @@ public void userGetWalletHistory (String currency, final Response.Listener) ApiInvoker.deserialize(localVarResponse, "array", Transaction.class)); + responseListener.onResponse((Wallet) ApiInvoker.deserialize(localVarResponse, "", Wallet.class)); } catch (ApiException exception) { errorListener.onErrorResponse(new VolleyError(exception)); } @@ -1732,16 +1739,18 @@ public void onErrorResponse(VolleyError error) { } } /** - * Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). + * Get a history of all of your wallet transactions (deposits, withdrawals, PNL). * * @param currency + * @param count Number of results to fetch. + * @param start Starting point for results. * @return List */ - public List userGetWalletSummary (String currency) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public List userGetWalletHistory (String currency, Double count, Double start) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/user/walletSummary"; + String path = "/user/walletHistory"; // query params List queryParams = new ArrayList(); @@ -1750,6 +1759,8 @@ public List userGetWalletSummary (String currency) throws TimeoutEx // form params Map formParams = new HashMap(); queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "count", count)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "start", start)); String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" @@ -1765,7 +1776,7 @@ public List userGetWalletSummary (String currency) throws TimeoutEx // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -1792,16 +1803,16 @@ public List userGetWalletSummary (String currency) throws TimeoutEx } /** - * Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). + * Get a history of all of your wallet transactions (deposits, withdrawals, PNL). * - * @param currency + * @param currency * @param count Number of results to fetch. * @param start Starting point for results. */ - public void userGetWalletSummary (String currency, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { + public void userGetWalletHistory (String currency, Double count, Double start, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/user/walletSummary".replaceAll("\\{format\\}","json"); + String path = "/user/walletHistory".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -1811,6 +1822,8 @@ public void userGetWalletSummary (String currency, final Response.Listener formParams = new HashMap(); queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "count", count)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "start", start)); String[] contentTypes = { @@ -1829,7 +1842,7 @@ public void userGetWalletSummary (String currency, final Response.Listener */ - public void userLogout () throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public List userGetWalletSummary (String currency) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/user/logout"; + String path = "/user/walletSummary"; // query params List queryParams = new ArrayList(); @@ -1869,6 +1883,7 @@ public void userLogout () throws TimeoutException, ExecutionException, Interrupt Map headerParams = new HashMap(); // form params Map formParams = new HashMap(); + queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" @@ -1884,14 +1899,14 @@ public void userLogout () throws TimeoutException, ExecutionException, Interrupt // normal form params } - String[] authNames = new String[] { }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { - String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); + String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return ; + return (List) ApiInvoker.deserialize(localVarResponse, "array", Transaction.class); } else { - return ; + return null; } } catch (ApiException ex) { throw ex; @@ -1911,16 +1926,16 @@ public void userLogout () throws TimeoutException, ExecutionException, Interrupt } /** - * Log out of BitMEX. + * Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). * - + * @param currency */ - public void userLogout (final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userGetWalletSummary (String currency, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/user/logout".replaceAll("\\{format\\}","json"); + String path = "/user/walletSummary".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -1929,6 +1944,7 @@ public void userLogout (final Response.Listener responseListener, final // form params Map formParams = new HashMap(); + queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency)); String[] contentTypes = { @@ -1947,14 +1963,18 @@ public void userLogout (final Response.Listener responseListener, final // normal form params } - String[] authNames = new String[] { }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { - apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, + apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, new Response.Listener() { @Override public void onResponse(String localVarResponse) { - responseListener.onResponse(localVarResponse); + try { + responseListener.onResponse((List) ApiInvoker.deserialize(localVarResponse, "array", Transaction.class)); + } catch (ApiException exception) { + errorListener.onErrorResponse(new VolleyError(exception)); + } } }, new Response.ErrorListener() { @Override @@ -1967,15 +1987,15 @@ public void onErrorResponse(VolleyError error) { } } /** - * Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. + * Log out of BitMEX. * - * @return Double + * @return void */ - public Double userLogoutAll () throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public void userLogout () throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // create path and map variables - String path = "/user/logoutAll"; + String path = "/user/logout"; // query params List queryParams = new ArrayList(); @@ -1998,14 +2018,14 @@ public Double userLogoutAll () throws TimeoutException, ExecutionException, Inte // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); if (localVarResponse != null) { - return (Double) ApiInvoker.deserialize(localVarResponse, "", Double.class); + return ; } else { - return null; + return ; } } catch (ApiException ex) { throw ex; @@ -2025,16 +2045,16 @@ public Double userLogoutAll () throws TimeoutException, ExecutionException, Inte } /** - * Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. + * Log out of BitMEX. * */ - public void userLogoutAll (final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userLogout (final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // create path and map variables - String path = "/user/logoutAll".replaceAll("\\{format\\}","json"); + String path = "/user/logout".replaceAll("\\{format\\}","json"); // query params List queryParams = new ArrayList(); @@ -2061,18 +2081,14 @@ public void userLogoutAll (final Response.Listener responseListener, fin // normal form params } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, new Response.Listener() { @Override public void onResponse(String localVarResponse) { - try { - responseListener.onResponse((Double) ApiInvoker.deserialize(localVarResponse, "", Double.class)); - } catch (ApiException exception) { - errorListener.onErrorResponse(new VolleyError(exception)); - } + responseListener.onResponse(localVarResponse); } }, new Response.ErrorListener() { @Override @@ -2206,144 +2222,17 @@ public void onErrorResponse(VolleyError error) { } } /** - * Get secret key for setting up two-factor auth. - * Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled. - * @param type Two-factor auth type. Supported types: 'GA' (Google Authenticator) - * @return Boolean - */ - public Boolean userRequestEnableTFA (String type) throws TimeoutException, ExecutionException, InterruptedException, ApiException { - Object postBody = null; - - // create path and map variables - String path = "/user/requestEnableTFA"; - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - String[] contentTypes = { - "application/json", - "application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (type != null) { - localVarBuilder.addTextBody("type", ApiInvoker.parameterToString(type), ApiInvoker.TEXT_PLAIN_UTF8); - } - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("type", ApiInvoker.parameterToString(type)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); - if (localVarResponse != null) { - return (Boolean) ApiInvoker.deserialize(localVarResponse, "", Boolean.class); - } else { - return null; - } - } catch (ApiException ex) { - throw ex; - } catch (InterruptedException ex) { - throw ex; - } catch (ExecutionException ex) { - if (ex.getCause() instanceof VolleyError) { - VolleyError volleyError = (VolleyError)ex.getCause(); - if (volleyError.networkResponse != null) { - throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage()); - } - } - throw ex; - } catch (TimeoutException ex) { - throw ex; - } - } - - /** - * Get secret key for setting up two-factor auth. - * Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled. - * @param type Two-factor auth type. Supported types: 'GA' (Google Authenticator) - */ - public void userRequestEnableTFA (String type, final Response.Listener responseListener, final Response.ErrorListener errorListener) { - Object postBody = null; - - - // create path and map variables - String path = "/user/requestEnableTFA".replaceAll("\\{format\\}","json"); - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - - - - String[] contentTypes = { - "application/json","application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - - if (type != null) { - localVarBuilder.addTextBody("type", ApiInvoker.parameterToString(type), ApiInvoker.TEXT_PLAIN_UTF8); - } - - - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("type", ApiInvoker.parameterToString(type)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, - new Response.Listener() { - @Override - public void onResponse(String localVarResponse) { - try { - responseListener.onResponse((Boolean) ApiInvoker.deserialize(localVarResponse, "", Boolean.class)); - } catch (ApiException exception) { - errorListener.onErrorResponse(new VolleyError(exception)); - } - } - }, new Response.ErrorListener() { - @Override - public void onErrorResponse(VolleyError error) { - errorListener.onErrorResponse(error); - } - }); - } catch (ApiException ex) { - errorListener.onErrorResponse(new VolleyError(ex)); - } - } - /** * Request a withdrawal to an external wallet. - * This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission. + * This will send a confirmation email to the email address on record. * @param currency Currency you're withdrawing. Options: `XBt` * @param amount Amount of withdrawal currency. * @param address Destination Address. * @param otpToken 2FA token. Required if 2FA is enabled on your account. * @param fee Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. + * @param text Optional annotation, e.g. 'Transfer to home wallet'. * @return Transaction */ - public Transaction userRequestWithdrawal (String currency, BigDecimal amount, String address, String otpToken, Double fee) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public Transaction userRequestWithdrawal (String currency, BigDecimal amount, String address, String otpToken, Double fee, String text) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = null; // verify the required parameter 'currency' is set if (currency == null) { @@ -2394,6 +2283,9 @@ public Transaction userRequestWithdrawal (String currency, BigDecimal amount, St if (fee != null) { localVarBuilder.addTextBody("fee", ApiInvoker.parameterToString(fee), ApiInvoker.TEXT_PLAIN_UTF8); } + if (text != null) { + localVarBuilder.addTextBody("text", ApiInvoker.parameterToString(text), ApiInvoker.TEXT_PLAIN_UTF8); + } HttpEntity httpEntity = localVarBuilder.build(); postBody = httpEntity; } else { @@ -2403,9 +2295,10 @@ public Transaction userRequestWithdrawal (String currency, BigDecimal amount, St formParams.put("amount", ApiInvoker.parameterToString(amount)); formParams.put("address", ApiInvoker.parameterToString(address)); formParams.put("fee", ApiInvoker.parameterToString(fee)); + formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -2433,10 +2326,10 @@ public Transaction userRequestWithdrawal (String currency, BigDecimal amount, St /** * Request a withdrawal to an external wallet. - * This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission. - * @param currency Currency you're withdrawing. Options: `XBt` * @param amount Amount of withdrawal currency. * @param address Destination Address. * @param otpToken 2FA token. Required if 2FA is enabled on your account. * @param fee Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. + * This will send a confirmation email to the email address on record. + * @param currency Currency you're withdrawing. Options: `XBt` * @param amount Amount of withdrawal currency. * @param address Destination Address. * @param otpToken 2FA token. Required if 2FA is enabled on your account. * @param fee Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. * @param text Optional annotation, e.g. 'Transfer to home wallet'. */ - public void userRequestWithdrawal (String currency, BigDecimal amount, String address, String otpToken, Double fee, final Response.Listener responseListener, final Response.ErrorListener errorListener) { + public void userRequestWithdrawal (String currency, BigDecimal amount, String address, String otpToken, Double fee, String text, final Response.Listener responseListener, final Response.ErrorListener errorListener) { Object postBody = null; // verify the required parameter 'currency' is set @@ -2496,6 +2389,10 @@ public void userRequestWithdrawal (String currency, BigDecimal amount, String ad localVarBuilder.addTextBody("fee", ApiInvoker.parameterToString(fee), ApiInvoker.TEXT_PLAIN_UTF8); } + if (text != null) { + localVarBuilder.addTextBody("text", ApiInvoker.parameterToString(text), ApiInvoker.TEXT_PLAIN_UTF8); + } + HttpEntity httpEntity = localVarBuilder.build(); postBody = httpEntity; @@ -2506,9 +2403,10 @@ public void userRequestWithdrawal (String currency, BigDecimal amount, String ad formParams.put("amount", ApiInvoker.parameterToString(amount)); formParams.put("address", ApiInvoker.parameterToString(address)); formParams.put("fee", ApiInvoker.parameterToString(fee)); +formParams.put("text", ApiInvoker.parameterToString(text)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -2578,7 +2476,7 @@ public User userSavePreferences (String prefs, Boolean overwrite) throws Timeout formParams.put("overwrite", ApiInvoker.parameterToString(overwrite)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames); @@ -2656,7 +2554,7 @@ public void userSavePreferences (String prefs, Boolean overwrite, final Response formParams.put("overwrite", ApiInvoker.parameterToString(overwrite)); } - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; try { apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, @@ -2679,202 +2577,4 @@ public void onErrorResponse(VolleyError error) { errorListener.onErrorResponse(new VolleyError(ex)); } } - /** - * Update your password, name, and other attributes. - * - * @param firstname - * @param lastname - * @param oldPassword - * @param newPassword - * @param newPasswordConfirm - * @param username Username can only be set once. To reset, email support. - * @param country Country of residence. - * @param pgpPubKey PGP Public Key. If specified, automated emails will be sentwith this key. - * @return User - */ - public User userUpdate (String firstname, String lastname, String oldPassword, String newPassword, String newPasswordConfirm, String username, String country, String pgpPubKey) throws TimeoutException, ExecutionException, InterruptedException, ApiException { - Object postBody = null; - - // create path and map variables - String path = "/user"; - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - String[] contentTypes = { - "application/json", - "application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - if (firstname != null) { - localVarBuilder.addTextBody("firstname", ApiInvoker.parameterToString(firstname), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (lastname != null) { - localVarBuilder.addTextBody("lastname", ApiInvoker.parameterToString(lastname), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (oldPassword != null) { - localVarBuilder.addTextBody("oldPassword", ApiInvoker.parameterToString(oldPassword), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (newPassword != null) { - localVarBuilder.addTextBody("newPassword", ApiInvoker.parameterToString(newPassword), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (newPasswordConfirm != null) { - localVarBuilder.addTextBody("newPasswordConfirm", ApiInvoker.parameterToString(newPasswordConfirm), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (username != null) { - localVarBuilder.addTextBody("username", ApiInvoker.parameterToString(username), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (country != null) { - localVarBuilder.addTextBody("country", ApiInvoker.parameterToString(country), ApiInvoker.TEXT_PLAIN_UTF8); - } - if (pgpPubKey != null) { - localVarBuilder.addTextBody("pgpPubKey", ApiInvoker.parameterToString(pgpPubKey), ApiInvoker.TEXT_PLAIN_UTF8); - } - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("firstname", ApiInvoker.parameterToString(firstname)); - formParams.put("lastname", ApiInvoker.parameterToString(lastname)); - formParams.put("oldPassword", ApiInvoker.parameterToString(oldPassword)); - formParams.put("newPassword", ApiInvoker.parameterToString(newPassword)); - formParams.put("newPasswordConfirm", ApiInvoker.parameterToString(newPasswordConfirm)); - formParams.put("username", ApiInvoker.parameterToString(username)); - formParams.put("country", ApiInvoker.parameterToString(country)); - formParams.put("pgpPubKey", ApiInvoker.parameterToString(pgpPubKey)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - String localVarResponse = apiInvoker.invokeAPI (basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames); - if (localVarResponse != null) { - return (User) ApiInvoker.deserialize(localVarResponse, "", User.class); - } else { - return null; - } - } catch (ApiException ex) { - throw ex; - } catch (InterruptedException ex) { - throw ex; - } catch (ExecutionException ex) { - if (ex.getCause() instanceof VolleyError) { - VolleyError volleyError = (VolleyError)ex.getCause(); - if (volleyError.networkResponse != null) { - throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage()); - } - } - throw ex; - } catch (TimeoutException ex) { - throw ex; - } - } - - /** - * Update your password, name, and other attributes. - * - * @param firstname * @param lastname * @param oldPassword * @param newPassword * @param newPasswordConfirm * @param username Username can only be set once. To reset, email support. * @param country Country of residence. * @param pgpPubKey PGP Public Key. If specified, automated emails will be sentwith this key. - */ - public void userUpdate (String firstname, String lastname, String oldPassword, String newPassword, String newPasswordConfirm, String username, String country, String pgpPubKey, final Response.Listener responseListener, final Response.ErrorListener errorListener) { - Object postBody = null; - - - // create path and map variables - String path = "/user".replaceAll("\\{format\\}","json"); - - // query params - List queryParams = new ArrayList(); - // header params - Map headerParams = new HashMap(); - // form params - Map formParams = new HashMap(); - - - - String[] contentTypes = { - "application/json","application/x-www-form-urlencoded" - }; - String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - - if (contentType.startsWith("multipart/form-data")) { - // file uploading - MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); - - if (firstname != null) { - localVarBuilder.addTextBody("firstname", ApiInvoker.parameterToString(firstname), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (lastname != null) { - localVarBuilder.addTextBody("lastname", ApiInvoker.parameterToString(lastname), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (oldPassword != null) { - localVarBuilder.addTextBody("oldPassword", ApiInvoker.parameterToString(oldPassword), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (newPassword != null) { - localVarBuilder.addTextBody("newPassword", ApiInvoker.parameterToString(newPassword), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (newPasswordConfirm != null) { - localVarBuilder.addTextBody("newPasswordConfirm", ApiInvoker.parameterToString(newPasswordConfirm), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (username != null) { - localVarBuilder.addTextBody("username", ApiInvoker.parameterToString(username), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (country != null) { - localVarBuilder.addTextBody("country", ApiInvoker.parameterToString(country), ApiInvoker.TEXT_PLAIN_UTF8); - } - - if (pgpPubKey != null) { - localVarBuilder.addTextBody("pgpPubKey", ApiInvoker.parameterToString(pgpPubKey), ApiInvoker.TEXT_PLAIN_UTF8); - } - - - HttpEntity httpEntity = localVarBuilder.build(); - postBody = httpEntity; - } else { - // normal form params - formParams.put("firstname", ApiInvoker.parameterToString(firstname)); -formParams.put("lastname", ApiInvoker.parameterToString(lastname)); -formParams.put("oldPassword", ApiInvoker.parameterToString(oldPassword)); -formParams.put("newPassword", ApiInvoker.parameterToString(newPassword)); -formParams.put("newPasswordConfirm", ApiInvoker.parameterToString(newPasswordConfirm)); -formParams.put("username", ApiInvoker.parameterToString(username)); -formParams.put("country", ApiInvoker.parameterToString(country)); -formParams.put("pgpPubKey", ApiInvoker.parameterToString(pgpPubKey)); - } - - String[] authNames = new String[] { "apiKey", "apiNonce", "apiSignature" }; - - try { - apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames, - new Response.Listener() { - @Override - public void onResponse(String localVarResponse) { - try { - responseListener.onResponse((User) ApiInvoker.deserialize(localVarResponse, "", User.class)); - } catch (ApiException exception) { - errorListener.onErrorResponse(new VolleyError(exception)); - } - } - }, new Response.ErrorListener() { - @Override - public void onErrorResponse(VolleyError error) { - errorListener.onErrorResponse(error); - } - }); - } catch (ApiException ex) { - errorListener.onErrorResponse(new VolleyError(ex)); - } - } } diff --git a/auto-generated/android/src/main/java/io/swagger/client/api/UserEventApi.java b/auto-generated/android/src/main/java/io/swagger/client/api/UserEventApi.java new file mode 100644 index 000000000..5d1712096 --- /dev/null +++ b/auto-generated/android/src/main/java/io/swagger/client/api/UserEventApi.java @@ -0,0 +1,183 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.api; + +import io.swagger.client.ApiInvoker; +import io.swagger.client.ApiException; +import io.swagger.client.Pair; + +import io.swagger.client.model.*; + +import java.util.*; + +import com.android.volley.Response; +import com.android.volley.VolleyError; + +import io.swagger.client.model.Error; +import io.swagger.client.model.UserEvent; + +import org.apache.http.HttpEntity; +import org.apache.http.entity.mime.MultipartEntityBuilder; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +public class UserEventApi { + String basePath = "https://www.bitmex.com/api/v1"; + ApiInvoker apiInvoker = ApiInvoker.getInstance(); + + public void addHeader(String key, String value) { + getInvoker().addDefaultHeader(key, value); + } + + public ApiInvoker getInvoker() { + return apiInvoker; + } + + public void setBasePath(String basePath) { + this.basePath = basePath; + } + + public String getBasePath() { + return basePath; + } + + /** + * Get your user events + * + * @param count Number of results to fetch. + * @param startId Cursor for pagination. + * @return List + */ + public List userEventGet (Double count, Double startId) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + Object postBody = null; + + // create path and map variables + String path = "/userEvent"; + + // query params + List queryParams = new ArrayList(); + // header params + Map headerParams = new HashMap(); + // form params + Map formParams = new HashMap(); + queryParams.addAll(ApiInvoker.parameterToPairs("", "count", count)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "startId", startId)); + String[] contentTypes = { + "application/json", + "application/x-www-form-urlencoded" + }; + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + + if (contentType.startsWith("multipart/form-data")) { + // file uploading + MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); + HttpEntity httpEntity = localVarBuilder.build(); + postBody = httpEntity; + } else { + // normal form params + } + + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; + + try { + String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames); + if (localVarResponse != null) { + return (List) ApiInvoker.deserialize(localVarResponse, "array", UserEvent.class); + } else { + return null; + } + } catch (ApiException ex) { + throw ex; + } catch (InterruptedException ex) { + throw ex; + } catch (ExecutionException ex) { + if (ex.getCause() instanceof VolleyError) { + VolleyError volleyError = (VolleyError)ex.getCause(); + if (volleyError.networkResponse != null) { + throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage()); + } + } + throw ex; + } catch (TimeoutException ex) { + throw ex; + } + } + + /** + * Get your user events + * + * @param count Number of results to fetch. * @param startId Cursor for pagination. + */ + public void userEventGet (Double count, Double startId, final Response.Listener> responseListener, final Response.ErrorListener errorListener) { + Object postBody = null; + + + // create path and map variables + String path = "/userEvent".replaceAll("\\{format\\}","json"); + + // query params + List queryParams = new ArrayList(); + // header params + Map headerParams = new HashMap(); + // form params + Map formParams = new HashMap(); + + queryParams.addAll(ApiInvoker.parameterToPairs("", "count", count)); + queryParams.addAll(ApiInvoker.parameterToPairs("", "startId", startId)); + + + String[] contentTypes = { + "application/json","application/x-www-form-urlencoded" + }; + String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; + + if (contentType.startsWith("multipart/form-data")) { + // file uploading + MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create(); + + + HttpEntity httpEntity = localVarBuilder.build(); + postBody = httpEntity; + } else { + // normal form params + } + + String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" }; + + try { + apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, + new Response.Listener() { + @Override + public void onResponse(String localVarResponse) { + try { + responseListener.onResponse((List) ApiInvoker.deserialize(localVarResponse, "array", UserEvent.class)); + } catch (ApiException exception) { + errorListener.onErrorResponse(new VolleyError(exception)); + } + } + }, new Response.ErrorListener() { + @Override + public void onErrorResponse(VolleyError error) { + errorListener.onErrorResponse(error); + } + }); + } catch (ApiException ex) { + errorListener.onErrorResponse(new VolleyError(ex)); + } + } +} diff --git a/auto-generated/android/src/main/java/io/swagger/client/auth/ApiKeyAuth.java b/auto-generated/android/src/main/java/io/swagger/client/auth/ApiKeyAuth.java index eae33649e..554a13898 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/auth/ApiKeyAuth.java +++ b/auto-generated/android/src/main/java/io/swagger/client/auth/ApiKeyAuth.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/auth/Authentication.java b/auto-generated/android/src/main/java/io/swagger/client/auth/Authentication.java index c32341154..526f379e2 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/auth/Authentication.java +++ b/auto-generated/android/src/main/java/io/swagger/client/auth/Authentication.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/auth/HttpBasicAuth.java b/auto-generated/android/src/main/java/io/swagger/client/auth/HttpBasicAuth.java index d53a2c64f..78176cd6b 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/auth/HttpBasicAuth.java +++ b/auto-generated/android/src/main/java/io/swagger/client/auth/HttpBasicAuth.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/APIKey.java b/auto-generated/android/src/main/java/io/swagger/client/model/APIKey.java index f2f501218..ce0560310 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/APIKey.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/APIKey.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/AccessToken.java b/auto-generated/android/src/main/java/io/swagger/client/model/AccessToken.java index c6e19a429..c779713ab 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/AccessToken.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/AccessToken.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Affiliate.java b/auto-generated/android/src/main/java/io/swagger/client/model/Affiliate.java index 3ef6a98fa..f4bf5fdb5 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Affiliate.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Affiliate.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -50,6 +50,10 @@ public class Affiliate { private Date timestamp = null; @SerializedName("referrerAccount") private Double referrerAccount = null; + @SerializedName("referralDiscount") + private Double referralDiscount = null; + @SerializedName("affiliatePayout") + private Double affiliatePayout = null; /** **/ @@ -201,6 +205,26 @@ public void setReferrerAccount(Double referrerAccount) { this.referrerAccount = referrerAccount; } + /** + **/ + @ApiModelProperty(value = "") + public Double getReferralDiscount() { + return referralDiscount; + } + public void setReferralDiscount(Double referralDiscount) { + this.referralDiscount = referralDiscount; + } + + /** + **/ + @ApiModelProperty(value = "") + public Double getAffiliatePayout() { + return affiliatePayout; + } + public void setAffiliatePayout(Double affiliatePayout) { + this.affiliatePayout = affiliatePayout; + } + @Override public boolean equals(Object o) { @@ -225,7 +249,9 @@ public boolean equals(Object o) { (this.payoutPcnt == null ? affiliate.payoutPcnt == null : this.payoutPcnt.equals(affiliate.payoutPcnt)) && (this.pendingPayout == null ? affiliate.pendingPayout == null : this.pendingPayout.equals(affiliate.pendingPayout)) && (this.timestamp == null ? affiliate.timestamp == null : this.timestamp.equals(affiliate.timestamp)) && - (this.referrerAccount == null ? affiliate.referrerAccount == null : this.referrerAccount.equals(affiliate.referrerAccount)); + (this.referrerAccount == null ? affiliate.referrerAccount == null : this.referrerAccount.equals(affiliate.referrerAccount)) && + (this.referralDiscount == null ? affiliate.referralDiscount == null : this.referralDiscount.equals(affiliate.referralDiscount)) && + (this.affiliatePayout == null ? affiliate.affiliatePayout == null : this.affiliatePayout.equals(affiliate.affiliatePayout)); } @Override @@ -246,6 +272,8 @@ public int hashCode() { result = 31 * result + (this.pendingPayout == null ? 0: this.pendingPayout.hashCode()); result = 31 * result + (this.timestamp == null ? 0: this.timestamp.hashCode()); result = 31 * result + (this.referrerAccount == null ? 0: this.referrerAccount.hashCode()); + result = 31 * result + (this.referralDiscount == null ? 0: this.referralDiscount.hashCode()); + result = 31 * result + (this.affiliatePayout == null ? 0: this.affiliatePayout.hashCode()); return result; } @@ -269,6 +297,8 @@ public String toString() { sb.append(" pendingPayout: ").append(pendingPayout).append("\n"); sb.append(" timestamp: ").append(timestamp).append("\n"); sb.append(" referrerAccount: ").append(referrerAccount).append("\n"); + sb.append(" referralDiscount: ").append(referralDiscount).append("\n"); + sb.append(" affiliatePayout: ").append(affiliatePayout).append("\n"); sb.append("}\n"); return sb.toString(); } diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Announcement.java b/auto-generated/android/src/main/java/io/swagger/client/model/Announcement.java index cba7804c2..2fa0cfdd1 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Announcement.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Announcement.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Chat.java b/auto-generated/android/src/main/java/io/swagger/client/model/Chat.java index 13180f6c0..dbcb1b00f 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Chat.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Chat.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/ChatChannel.java b/auto-generated/android/src/main/java/io/swagger/client/model/ChatChannel.java index a6a304c83..404a89994 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/ChatChannel.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/ChatChannel.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/CommunicationToken.java b/auto-generated/android/src/main/java/io/swagger/client/model/CommunicationToken.java new file mode 100644 index 000000000..dc5f08f4d --- /dev/null +++ b/auto-generated/android/src/main/java/io/swagger/client/model/CommunicationToken.java @@ -0,0 +1,112 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import java.math.BigDecimal; +import io.swagger.annotations.*; +import com.google.gson.annotations.SerializedName; + +/** + * User communication SNS token + **/ +@ApiModel(description = "User communication SNS token") +public class CommunicationToken { + + @SerializedName("id") + private String id = null; + @SerializedName("userId") + private BigDecimal userId = null; + @SerializedName("deviceToken") + private String deviceToken = null; + @SerializedName("channel") + private String channel = null; + + /** + **/ + @ApiModelProperty(required = true, value = "") + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + + /** + **/ + @ApiModelProperty(required = true, value = "") + public BigDecimal getUserId() { + return userId; + } + public void setUserId(BigDecimal userId) { + this.userId = userId; + } + + /** + **/ + @ApiModelProperty(required = true, value = "") + public String getDeviceToken() { + return deviceToken; + } + public void setDeviceToken(String deviceToken) { + this.deviceToken = deviceToken; + } + + /** + **/ + @ApiModelProperty(required = true, value = "") + public String getChannel() { + return channel; + } + public void setChannel(String channel) { + this.channel = channel; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommunicationToken communicationToken = (CommunicationToken) o; + return (this.id == null ? communicationToken.id == null : this.id.equals(communicationToken.id)) && + (this.userId == null ? communicationToken.userId == null : this.userId.equals(communicationToken.userId)) && + (this.deviceToken == null ? communicationToken.deviceToken == null : this.deviceToken.equals(communicationToken.deviceToken)) && + (this.channel == null ? communicationToken.channel == null : this.channel.equals(communicationToken.channel)); + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + (this.id == null ? 0: this.id.hashCode()); + result = 31 * result + (this.userId == null ? 0: this.userId.hashCode()); + result = 31 * result + (this.deviceToken == null ? 0: this.deviceToken.hashCode()); + result = 31 * result + (this.channel == null ? 0: this.channel.hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommunicationToken {\n"); + + sb.append(" id: ").append(id).append("\n"); + sb.append(" userId: ").append(userId).append("\n"); + sb.append(" deviceToken: ").append(deviceToken).append("\n"); + sb.append(" channel: ").append(channel).append("\n"); + sb.append("}\n"); + return sb.toString(); + } +} diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/ConnectedUsers.java b/auto-generated/android/src/main/java/io/swagger/client/model/ConnectedUsers.java index c0f4ea638..fa5ee4292 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/ConnectedUsers.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/ConnectedUsers.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Error.java b/auto-generated/android/src/main/java/io/swagger/client/model/Error.java index dfc98678b..33508628f 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Error.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Error.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/ErrorError.java b/auto-generated/android/src/main/java/io/swagger/client/model/ErrorError.java index 7962bbac7..51dc07136 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/ErrorError.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/ErrorError.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Execution.java b/auto-generated/android/src/main/java/io/swagger/client/model/Execution.java index 3d0b6b9a5..f623b480f 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Execution.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Execution.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Funding.java b/auto-generated/android/src/main/java/io/swagger/client/model/Funding.java index 1a8d13981..37b0bee90 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Funding.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Funding.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Notification.java b/auto-generated/android/src/main/java/io/swagger/client/model/GlobalNotification.java similarity index 63% rename from auto-generated/android/src/main/java/io/swagger/client/model/Notification.java rename to auto-generated/android/src/main/java/io/swagger/client/model/GlobalNotification.java index fc7e3881b..a3778b8c4 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Notification.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/GlobalNotification.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -21,7 +21,7 @@ * Account Notifications **/ @ApiModel(description = "Account Notifications") -public class Notification { +public class GlobalNotification { @SerializedName("id") private BigDecimal id = null; @@ -156,17 +156,17 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Notification notification = (Notification) o; - return (this.id == null ? notification.id == null : this.id.equals(notification.id)) && - (this.date == null ? notification.date == null : this.date.equals(notification.date)) && - (this.title == null ? notification.title == null : this.title.equals(notification.title)) && - (this.body == null ? notification.body == null : this.body.equals(notification.body)) && - (this.ttl == null ? notification.ttl == null : this.ttl.equals(notification.ttl)) && - (this.type == null ? notification.type == null : this.type.equals(notification.type)) && - (this.closable == null ? notification.closable == null : this.closable.equals(notification.closable)) && - (this.persist == null ? notification.persist == null : this.persist.equals(notification.persist)) && - (this.waitForVisibility == null ? notification.waitForVisibility == null : this.waitForVisibility.equals(notification.waitForVisibility)) && - (this.sound == null ? notification.sound == null : this.sound.equals(notification.sound)); + GlobalNotification globalNotification = (GlobalNotification) o; + return (this.id == null ? globalNotification.id == null : this.id.equals(globalNotification.id)) && + (this.date == null ? globalNotification.date == null : this.date.equals(globalNotification.date)) && + (this.title == null ? globalNotification.title == null : this.title.equals(globalNotification.title)) && + (this.body == null ? globalNotification.body == null : this.body.equals(globalNotification.body)) && + (this.ttl == null ? globalNotification.ttl == null : this.ttl.equals(globalNotification.ttl)) && + (this.type == null ? globalNotification.type == null : this.type.equals(globalNotification.type)) && + (this.closable == null ? globalNotification.closable == null : this.closable.equals(globalNotification.closable)) && + (this.persist == null ? globalNotification.persist == null : this.persist.equals(globalNotification.persist)) && + (this.waitForVisibility == null ? globalNotification.waitForVisibility == null : this.waitForVisibility.equals(globalNotification.waitForVisibility)) && + (this.sound == null ? globalNotification.sound == null : this.sound.equals(globalNotification.sound)); } @Override @@ -188,7 +188,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Notification {\n"); + sb.append("class GlobalNotification {\n"); sb.append(" id: ").append(id).append("\n"); sb.append(" date: ").append(date).append("\n"); diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/IndexComposite.java b/auto-generated/android/src/main/java/io/swagger/client/model/IndexComposite.java index d808c4dad..d54934bd3 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/IndexComposite.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/IndexComposite.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/InlineResponse200.java b/auto-generated/android/src/main/java/io/swagger/client/model/InlineResponse200.java index 82c367b55..131def26d 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/InlineResponse200.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/InlineResponse200.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -18,17 +18,17 @@ @ApiModel(description = "") public class InlineResponse200 { - @SerializedName("success") - private Boolean success = null; + @SerializedName("name") + private String name = null; /** **/ @ApiModelProperty(value = "") - public Boolean getSuccess() { - return success; + public String getName() { + return name; } - public void setSuccess(Boolean success) { - this.success = success; + public void setName(String name) { + this.name = name; } @@ -41,13 +41,13 @@ public boolean equals(Object o) { return false; } InlineResponse200 inlineResponse200 = (InlineResponse200) o; - return (this.success == null ? inlineResponse200.success == null : this.success.equals(inlineResponse200.success)); + return (this.name == null ? inlineResponse200.name == null : this.name.equals(inlineResponse200.name)); } @Override public int hashCode() { int result = 17; - result = 31 * result + (this.success == null ? 0: this.success.hashCode()); + result = 31 * result + (this.name == null ? 0: this.name.hashCode()); return result; } @@ -56,7 +56,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InlineResponse200 {\n"); - sb.append(" success: ").append(success).append("\n"); + sb.append(" name: ").append(name).append("\n"); sb.append("}\n"); return sb.toString(); } diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/InlineResponse2001.java b/auto-generated/android/src/main/java/io/swagger/client/model/InlineResponse2001.java deleted file mode 100644 index 954a96a42..000000000 --- a/auto-generated/android/src/main/java/io/swagger/client/model/InlineResponse2001.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import io.swagger.annotations.*; -import com.google.gson.annotations.SerializedName; - -@ApiModel(description = "") -public class InlineResponse2001 { - - @SerializedName("name") - private String name = null; - - /** - **/ - @ApiModelProperty(value = "") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InlineResponse2001 inlineResponse2001 = (InlineResponse2001) o; - return (this.name == null ? inlineResponse2001.name == null : this.name.equals(inlineResponse2001.name)); - } - - @Override - public int hashCode() { - int result = 17; - result = 31 * result + (this.name == null ? 0: this.name.hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InlineResponse2001 {\n"); - - sb.append(" name: ").append(name).append("\n"); - sb.append("}\n"); - return sb.toString(); - } -} diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Instrument.java b/auto-generated/android/src/main/java/io/swagger/client/model/Instrument.java index bf9b65a0f..231d57a37 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Instrument.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Instrument.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -169,6 +169,10 @@ public class Instrument { private BigDecimal turnover = null; @SerializedName("turnover24h") private BigDecimal turnover24h = null; + @SerializedName("homeNotional24h") + private Double homeNotional24h = null; + @SerializedName("foreignNotional24h") + private Double foreignNotional24h = null; @SerializedName("prevPrice24h") private Double prevPrice24h = null; @SerializedName("vwap") @@ -956,6 +960,26 @@ public void setTurnover24h(BigDecimal turnover24h) { this.turnover24h = turnover24h; } + /** + **/ + @ApiModelProperty(value = "") + public Double getHomeNotional24h() { + return homeNotional24h; + } + public void setHomeNotional24h(Double homeNotional24h) { + this.homeNotional24h = homeNotional24h; + } + + /** + **/ + @ApiModelProperty(value = "") + public Double getForeignNotional24h() { + return foreignNotional24h; + } + public void setForeignNotional24h(Double foreignNotional24h) { + this.foreignNotional24h = foreignNotional24h; + } + /** **/ @ApiModelProperty(value = "") @@ -1319,6 +1343,8 @@ public boolean equals(Object o) { (this.totalTurnover == null ? instrument.totalTurnover == null : this.totalTurnover.equals(instrument.totalTurnover)) && (this.turnover == null ? instrument.turnover == null : this.turnover.equals(instrument.turnover)) && (this.turnover24h == null ? instrument.turnover24h == null : this.turnover24h.equals(instrument.turnover24h)) && + (this.homeNotional24h == null ? instrument.homeNotional24h == null : this.homeNotional24h.equals(instrument.homeNotional24h)) && + (this.foreignNotional24h == null ? instrument.foreignNotional24h == null : this.foreignNotional24h.equals(instrument.foreignNotional24h)) && (this.prevPrice24h == null ? instrument.prevPrice24h == null : this.prevPrice24h.equals(instrument.prevPrice24h)) && (this.vwap == null ? instrument.vwap == null : this.vwap.equals(instrument.vwap)) && (this.highPrice == null ? instrument.highPrice == null : this.highPrice.equals(instrument.highPrice)) && @@ -1425,6 +1451,8 @@ public int hashCode() { result = 31 * result + (this.totalTurnover == null ? 0: this.totalTurnover.hashCode()); result = 31 * result + (this.turnover == null ? 0: this.turnover.hashCode()); result = 31 * result + (this.turnover24h == null ? 0: this.turnover24h.hashCode()); + result = 31 * result + (this.homeNotional24h == null ? 0: this.homeNotional24h.hashCode()); + result = 31 * result + (this.foreignNotional24h == null ? 0: this.foreignNotional24h.hashCode()); result = 31 * result + (this.prevPrice24h == null ? 0: this.prevPrice24h.hashCode()); result = 31 * result + (this.vwap == null ? 0: this.vwap.hashCode()); result = 31 * result + (this.highPrice == null ? 0: this.highPrice.hashCode()); @@ -1534,6 +1562,8 @@ public String toString() { sb.append(" totalTurnover: ").append(totalTurnover).append("\n"); sb.append(" turnover: ").append(turnover).append("\n"); sb.append(" turnover24h: ").append(turnover24h).append("\n"); + sb.append(" homeNotional24h: ").append(homeNotional24h).append("\n"); + sb.append(" foreignNotional24h: ").append(foreignNotional24h).append("\n"); sb.append(" prevPrice24h: ").append(prevPrice24h).append("\n"); sb.append(" vwap: ").append(vwap).append("\n"); sb.append(" highPrice: ").append(highPrice).append("\n"); diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/InstrumentInterval.java b/auto-generated/android/src/main/java/io/swagger/client/model/InstrumentInterval.java index 7bf724df8..53309b9fe 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/InstrumentInterval.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/InstrumentInterval.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Insurance.java b/auto-generated/android/src/main/java/io/swagger/client/model/Insurance.java index 3346bc66e..3aff692b7 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Insurance.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Insurance.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Leaderboard.java b/auto-generated/android/src/main/java/io/swagger/client/model/Leaderboard.java index 678393ef8..f1709938a 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Leaderboard.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Leaderboard.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Liquidation.java b/auto-generated/android/src/main/java/io/swagger/client/model/Liquidation.java index 7a482b99b..8f7ff5e11 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Liquidation.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Liquidation.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Margin.java b/auto-generated/android/src/main/java/io/swagger/client/model/Margin.java index 8d608679a..0c9278a87 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Margin.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Margin.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Order.java b/auto-generated/android/src/main/java/io/swagger/client/model/Order.java index b6ff45058..e2ca6dd01 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Order.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Order.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/OrderBookL2.java b/auto-generated/android/src/main/java/io/swagger/client/model/OrderBookL2.java index 75a8bbb83..d02365d8b 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/OrderBookL2.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/OrderBookL2.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Position.java b/auto-generated/android/src/main/java/io/swagger/client/model/Position.java index 3018f5288..0f2c127be 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Position.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Position.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Quote.java b/auto-generated/android/src/main/java/io/swagger/client/model/Quote.java index b07d06ded..97fc82ba8 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Quote.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Quote.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/QuoteFillRatio.java b/auto-generated/android/src/main/java/io/swagger/client/model/QuoteFillRatio.java new file mode 100644 index 000000000..d9b37ad20 --- /dev/null +++ b/auto-generated/android/src/main/java/io/swagger/client/model/QuoteFillRatio.java @@ -0,0 +1,157 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import java.util.Date; +import io.swagger.annotations.*; +import com.google.gson.annotations.SerializedName; + +/** + * Daily Quote Fill Ratio Statistic + **/ +@ApiModel(description = "Daily Quote Fill Ratio Statistic") +public class QuoteFillRatio { + + @SerializedName("date") + private Date date = null; + @SerializedName("account") + private Double account = null; + @SerializedName("quoteCount") + private Double quoteCount = null; + @SerializedName("dealtCount") + private Double dealtCount = null; + @SerializedName("quotesMavg7") + private Double quotesMavg7 = null; + @SerializedName("dealtMavg7") + private Double dealtMavg7 = null; + @SerializedName("quoteFillRatioMavg7") + private Double quoteFillRatioMavg7 = null; + + /** + **/ + @ApiModelProperty(required = true, value = "") + public Date getDate() { + return date; + } + public void setDate(Date date) { + this.date = date; + } + + /** + **/ + @ApiModelProperty(value = "") + public Double getAccount() { + return account; + } + public void setAccount(Double account) { + this.account = account; + } + + /** + **/ + @ApiModelProperty(value = "") + public Double getQuoteCount() { + return quoteCount; + } + public void setQuoteCount(Double quoteCount) { + this.quoteCount = quoteCount; + } + + /** + **/ + @ApiModelProperty(value = "") + public Double getDealtCount() { + return dealtCount; + } + public void setDealtCount(Double dealtCount) { + this.dealtCount = dealtCount; + } + + /** + **/ + @ApiModelProperty(value = "") + public Double getQuotesMavg7() { + return quotesMavg7; + } + public void setQuotesMavg7(Double quotesMavg7) { + this.quotesMavg7 = quotesMavg7; + } + + /** + **/ + @ApiModelProperty(value = "") + public Double getDealtMavg7() { + return dealtMavg7; + } + public void setDealtMavg7(Double dealtMavg7) { + this.dealtMavg7 = dealtMavg7; + } + + /** + **/ + @ApiModelProperty(value = "") + public Double getQuoteFillRatioMavg7() { + return quoteFillRatioMavg7; + } + public void setQuoteFillRatioMavg7(Double quoteFillRatioMavg7) { + this.quoteFillRatioMavg7 = quoteFillRatioMavg7; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteFillRatio quoteFillRatio = (QuoteFillRatio) o; + return (this.date == null ? quoteFillRatio.date == null : this.date.equals(quoteFillRatio.date)) && + (this.account == null ? quoteFillRatio.account == null : this.account.equals(quoteFillRatio.account)) && + (this.quoteCount == null ? quoteFillRatio.quoteCount == null : this.quoteCount.equals(quoteFillRatio.quoteCount)) && + (this.dealtCount == null ? quoteFillRatio.dealtCount == null : this.dealtCount.equals(quoteFillRatio.dealtCount)) && + (this.quotesMavg7 == null ? quoteFillRatio.quotesMavg7 == null : this.quotesMavg7.equals(quoteFillRatio.quotesMavg7)) && + (this.dealtMavg7 == null ? quoteFillRatio.dealtMavg7 == null : this.dealtMavg7.equals(quoteFillRatio.dealtMavg7)) && + (this.quoteFillRatioMavg7 == null ? quoteFillRatio.quoteFillRatioMavg7 == null : this.quoteFillRatioMavg7.equals(quoteFillRatio.quoteFillRatioMavg7)); + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + (this.date == null ? 0: this.date.hashCode()); + result = 31 * result + (this.account == null ? 0: this.account.hashCode()); + result = 31 * result + (this.quoteCount == null ? 0: this.quoteCount.hashCode()); + result = 31 * result + (this.dealtCount == null ? 0: this.dealtCount.hashCode()); + result = 31 * result + (this.quotesMavg7 == null ? 0: this.quotesMavg7.hashCode()); + result = 31 * result + (this.dealtMavg7 == null ? 0: this.dealtMavg7.hashCode()); + result = 31 * result + (this.quoteFillRatioMavg7 == null ? 0: this.quoteFillRatioMavg7.hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteFillRatio {\n"); + + sb.append(" date: ").append(date).append("\n"); + sb.append(" account: ").append(account).append("\n"); + sb.append(" quoteCount: ").append(quoteCount).append("\n"); + sb.append(" dealtCount: ").append(dealtCount).append("\n"); + sb.append(" quotesMavg7: ").append(quotesMavg7).append("\n"); + sb.append(" dealtMavg7: ").append(dealtMavg7).append("\n"); + sb.append(" quoteFillRatioMavg7: ").append(quoteFillRatioMavg7).append("\n"); + sb.append("}\n"); + return sb.toString(); + } +} diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Settlement.java b/auto-generated/android/src/main/java/io/swagger/client/model/Settlement.java index 3e7030b06..39ecfa0e8 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Settlement.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Settlement.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Stats.java b/auto-generated/android/src/main/java/io/swagger/client/model/Stats.java index 9799fc847..693d825bc 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Stats.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Stats.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/StatsHistory.java b/auto-generated/android/src/main/java/io/swagger/client/model/StatsHistory.java index 6c4d3bbe4..b6f0ef13d 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/StatsHistory.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/StatsHistory.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/StatsUSD.java b/auto-generated/android/src/main/java/io/swagger/client/model/StatsUSD.java index 40da6949e..c6eb3b456 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/StatsUSD.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/StatsUSD.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Trade.java b/auto-generated/android/src/main/java/io/swagger/client/model/Trade.java index 4c7145771..53c70f86d 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Trade.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Trade.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/TradeBin.java b/auto-generated/android/src/main/java/io/swagger/client/model/TradeBin.java index a529bcbb8..0e102d3de 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/TradeBin.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/TradeBin.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Transaction.java b/auto-generated/android/src/main/java/io/swagger/client/model/Transaction.java index 64be35e2e..65a3bd8af 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Transaction.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Transaction.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/User.java b/auto-generated/android/src/main/java/io/swagger/client/model/User.java index e6a258f8c..24d436834 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/User.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/User.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/UserCommission.java b/auto-generated/android/src/main/java/io/swagger/client/model/UserCommission.java deleted file mode 100644 index 47eae505a..000000000 --- a/auto-generated/android/src/main/java/io/swagger/client/model/UserCommission.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -package io.swagger.client.model; - -import io.swagger.annotations.*; -import com.google.gson.annotations.SerializedName; - -@ApiModel(description = "") -public class UserCommission { - - @SerializedName("makerFee") - private Double makerFee = null; - @SerializedName("takerFee") - private Double takerFee = null; - @SerializedName("settlementFee") - private Double settlementFee = null; - @SerializedName("maxFee") - private Double maxFee = null; - - /** - **/ - @ApiModelProperty(value = "") - public Double getMakerFee() { - return makerFee; - } - public void setMakerFee(Double makerFee) { - this.makerFee = makerFee; - } - - /** - **/ - @ApiModelProperty(value = "") - public Double getTakerFee() { - return takerFee; - } - public void setTakerFee(Double takerFee) { - this.takerFee = takerFee; - } - - /** - **/ - @ApiModelProperty(value = "") - public Double getSettlementFee() { - return settlementFee; - } - public void setSettlementFee(Double settlementFee) { - this.settlementFee = settlementFee; - } - - /** - **/ - @ApiModelProperty(value = "") - public Double getMaxFee() { - return maxFee; - } - public void setMaxFee(Double maxFee) { - this.maxFee = maxFee; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserCommission userCommission = (UserCommission) o; - return (this.makerFee == null ? userCommission.makerFee == null : this.makerFee.equals(userCommission.makerFee)) && - (this.takerFee == null ? userCommission.takerFee == null : this.takerFee.equals(userCommission.takerFee)) && - (this.settlementFee == null ? userCommission.settlementFee == null : this.settlementFee.equals(userCommission.settlementFee)) && - (this.maxFee == null ? userCommission.maxFee == null : this.maxFee.equals(userCommission.maxFee)); - } - - @Override - public int hashCode() { - int result = 17; - result = 31 * result + (this.makerFee == null ? 0: this.makerFee.hashCode()); - result = 31 * result + (this.takerFee == null ? 0: this.takerFee.hashCode()); - result = 31 * result + (this.settlementFee == null ? 0: this.settlementFee.hashCode()); - result = 31 * result + (this.maxFee == null ? 0: this.maxFee.hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserCommission {\n"); - - sb.append(" makerFee: ").append(makerFee).append("\n"); - sb.append(" takerFee: ").append(takerFee).append("\n"); - sb.append(" settlementFee: ").append(settlementFee).append("\n"); - sb.append(" maxFee: ").append(maxFee).append("\n"); - sb.append("}\n"); - return sb.toString(); - } -} diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/UserCommissionsBySymbol.java b/auto-generated/android/src/main/java/io/swagger/client/model/UserCommissionsBySymbol.java new file mode 100644 index 000000000..4019f5552 --- /dev/null +++ b/auto-generated/android/src/main/java/io/swagger/client/model/UserCommissionsBySymbol.java @@ -0,0 +1,49 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import io.swagger.annotations.*; +import com.google.gson.annotations.SerializedName; + +@ApiModel(description = "") +public class UserCommissionsBySymbol { + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserCommissionsBySymbol userCommissionsBySymbol = (UserCommissionsBySymbol) o; + return true; + } + + @Override + public int hashCode() { + int result = 17; + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserCommissionsBySymbol {\n"); + + sb.append("}\n"); + return sb.toString(); + } +} diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/UserEvent.java b/auto-generated/android/src/main/java/io/swagger/client/model/UserEvent.java new file mode 100644 index 000000000..304228806 --- /dev/null +++ b/auto-generated/android/src/main/java/io/swagger/client/model/UserEvent.java @@ -0,0 +1,223 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import java.util.Date; +import io.swagger.annotations.*; +import com.google.gson.annotations.SerializedName; + +/** + * User Events for auditing + **/ +@ApiModel(description = "User Events for auditing") +public class UserEvent { + + @SerializedName("id") + private Double id = null; + public enum TypeEnum { + apiKeyCreated, deleverageExecution, depositConfirmed, depositPending, banZeroVolumeApiUser, liquidationOrderPlaced, login, pgpMaskedEmail, pgpTestEmail, passwordChanged, positionStateLiquidated, positionStateWarning, resetPasswordConfirmed, resetPasswordRequest, transferCanceled, transferCompleted, transferReceived, transferRequested, twoFactorDisabled, twoFactorEnabled, withdrawalCanceled, withdrawalCompleted, withdrawalConfirmed, withdrawalRequested, verify, + }; + @SerializedName("type") + private TypeEnum type = null; + public enum StatusEnum { + success, failure, + }; + @SerializedName("status") + private StatusEnum status = null; + @SerializedName("userId") + private Double userId = null; + @SerializedName("createdById") + private Double createdById = null; + @SerializedName("ip") + private String ip = null; + @SerializedName("geoipCountry") + private String geoipCountry = null; + @SerializedName("geoipRegion") + private String geoipRegion = null; + @SerializedName("geoipSubRegion") + private String geoipSubRegion = null; + @SerializedName("eventMeta") + private Object eventMeta = null; + @SerializedName("created") + private Date created = null; + + /** + **/ + @ApiModelProperty(value = "") + public Double getId() { + return id; + } + public void setId(Double id) { + this.id = id; + } + + /** + **/ + @ApiModelProperty(required = true, value = "") + public TypeEnum getType() { + return type; + } + public void setType(TypeEnum type) { + this.type = type; + } + + /** + **/ + @ApiModelProperty(required = true, value = "") + public StatusEnum getStatus() { + return status; + } + public void setStatus(StatusEnum status) { + this.status = status; + } + + /** + **/ + @ApiModelProperty(required = true, value = "") + public Double getUserId() { + return userId; + } + public void setUserId(Double userId) { + this.userId = userId; + } + + /** + **/ + @ApiModelProperty(required = true, value = "") + public Double getCreatedById() { + return createdById; + } + public void setCreatedById(Double createdById) { + this.createdById = createdById; + } + + /** + **/ + @ApiModelProperty(value = "") + public String getIp() { + return ip; + } + public void setIp(String ip) { + this.ip = ip; + } + + /** + **/ + @ApiModelProperty(value = "") + public String getGeoipCountry() { + return geoipCountry; + } + public void setGeoipCountry(String geoipCountry) { + this.geoipCountry = geoipCountry; + } + + /** + **/ + @ApiModelProperty(value = "") + public String getGeoipRegion() { + return geoipRegion; + } + public void setGeoipRegion(String geoipRegion) { + this.geoipRegion = geoipRegion; + } + + /** + **/ + @ApiModelProperty(value = "") + public String getGeoipSubRegion() { + return geoipSubRegion; + } + public void setGeoipSubRegion(String geoipSubRegion) { + this.geoipSubRegion = geoipSubRegion; + } + + /** + **/ + @ApiModelProperty(value = "") + public Object getEventMeta() { + return eventMeta; + } + public void setEventMeta(Object eventMeta) { + this.eventMeta = eventMeta; + } + + /** + **/ + @ApiModelProperty(required = true, value = "") + public Date getCreated() { + return created; + } + public void setCreated(Date created) { + this.created = created; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserEvent userEvent = (UserEvent) o; + return (this.id == null ? userEvent.id == null : this.id.equals(userEvent.id)) && + (this.type == null ? userEvent.type == null : this.type.equals(userEvent.type)) && + (this.status == null ? userEvent.status == null : this.status.equals(userEvent.status)) && + (this.userId == null ? userEvent.userId == null : this.userId.equals(userEvent.userId)) && + (this.createdById == null ? userEvent.createdById == null : this.createdById.equals(userEvent.createdById)) && + (this.ip == null ? userEvent.ip == null : this.ip.equals(userEvent.ip)) && + (this.geoipCountry == null ? userEvent.geoipCountry == null : this.geoipCountry.equals(userEvent.geoipCountry)) && + (this.geoipRegion == null ? userEvent.geoipRegion == null : this.geoipRegion.equals(userEvent.geoipRegion)) && + (this.geoipSubRegion == null ? userEvent.geoipSubRegion == null : this.geoipSubRegion.equals(userEvent.geoipSubRegion)) && + (this.eventMeta == null ? userEvent.eventMeta == null : this.eventMeta.equals(userEvent.eventMeta)) && + (this.created == null ? userEvent.created == null : this.created.equals(userEvent.created)); + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + (this.id == null ? 0: this.id.hashCode()); + result = 31 * result + (this.type == null ? 0: this.type.hashCode()); + result = 31 * result + (this.status == null ? 0: this.status.hashCode()); + result = 31 * result + (this.userId == null ? 0: this.userId.hashCode()); + result = 31 * result + (this.createdById == null ? 0: this.createdById.hashCode()); + result = 31 * result + (this.ip == null ? 0: this.ip.hashCode()); + result = 31 * result + (this.geoipCountry == null ? 0: this.geoipCountry.hashCode()); + result = 31 * result + (this.geoipRegion == null ? 0: this.geoipRegion.hashCode()); + result = 31 * result + (this.geoipSubRegion == null ? 0: this.geoipSubRegion.hashCode()); + result = 31 * result + (this.eventMeta == null ? 0: this.eventMeta.hashCode()); + result = 31 * result + (this.created == null ? 0: this.created.hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserEvent {\n"); + + sb.append(" id: ").append(id).append("\n"); + sb.append(" type: ").append(type).append("\n"); + sb.append(" status: ").append(status).append("\n"); + sb.append(" userId: ").append(userId).append("\n"); + sb.append(" createdById: ").append(createdById).append("\n"); + sb.append(" ip: ").append(ip).append("\n"); + sb.append(" geoipCountry: ").append(geoipCountry).append("\n"); + sb.append(" geoipRegion: ").append(geoipRegion).append("\n"); + sb.append(" geoipSubRegion: ").append(geoipSubRegion).append("\n"); + sb.append(" eventMeta: ").append(eventMeta).append("\n"); + sb.append(" created: ").append(created).append("\n"); + sb.append("}\n"); + return sb.toString(); + } +} diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/UserPreferences.java b/auto-generated/android/src/main/java/io/swagger/client/model/UserPreferences.java index 584d95d0f..d5997fa27 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/UserPreferences.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/UserPreferences.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -36,6 +36,8 @@ public class UserPreferences { private Boolean debug = null; @SerializedName("disableEmails") private List disableEmails = null; + @SerializedName("disablePush") + private List disablePush = null; @SerializedName("hideConfirmDialogs") private List hideConfirmDialogs = null; @SerializedName("hideConnectionModal") @@ -153,6 +155,16 @@ public void setDisableEmails(List disableEmails) { this.disableEmails = disableEmails; } + /** + **/ + @ApiModelProperty(value = "") + public List getDisablePush() { + return disablePush; + } + public void setDisablePush(List disablePush) { + this.disablePush = disablePush; + } + /** **/ @ApiModelProperty(value = "") @@ -351,6 +363,7 @@ public boolean equals(Object o) { (this.currency == null ? userPreferences.currency == null : this.currency.equals(userPreferences.currency)) && (this.debug == null ? userPreferences.debug == null : this.debug.equals(userPreferences.debug)) && (this.disableEmails == null ? userPreferences.disableEmails == null : this.disableEmails.equals(userPreferences.disableEmails)) && + (this.disablePush == null ? userPreferences.disablePush == null : this.disablePush.equals(userPreferences.disablePush)) && (this.hideConfirmDialogs == null ? userPreferences.hideConfirmDialogs == null : this.hideConfirmDialogs.equals(userPreferences.hideConfirmDialogs)) && (this.hideConnectionModal == null ? userPreferences.hideConnectionModal == null : this.hideConnectionModal.equals(userPreferences.hideConnectionModal)) && (this.hideFromLeaderboard == null ? userPreferences.hideFromLeaderboard == null : this.hideFromLeaderboard.equals(userPreferences.hideFromLeaderboard)) && @@ -382,6 +395,7 @@ public int hashCode() { result = 31 * result + (this.currency == null ? 0: this.currency.hashCode()); result = 31 * result + (this.debug == null ? 0: this.debug.hashCode()); result = 31 * result + (this.disableEmails == null ? 0: this.disableEmails.hashCode()); + result = 31 * result + (this.disablePush == null ? 0: this.disablePush.hashCode()); result = 31 * result + (this.hideConfirmDialogs == null ? 0: this.hideConfirmDialogs.hashCode()); result = 31 * result + (this.hideConnectionModal == null ? 0: this.hideConnectionModal.hashCode()); result = 31 * result + (this.hideFromLeaderboard == null ? 0: this.hideFromLeaderboard.hashCode()); @@ -416,6 +430,7 @@ public String toString() { sb.append(" currency: ").append(currency).append("\n"); sb.append(" debug: ").append(debug).append("\n"); sb.append(" disableEmails: ").append(disableEmails).append("\n"); + sb.append(" disablePush: ").append(disablePush).append("\n"); sb.append(" hideConfirmDialogs: ").append(hideConfirmDialogs).append("\n"); sb.append(" hideConnectionModal: ").append(hideConnectionModal).append("\n"); sb.append(" hideFromLeaderboard: ").append(hideFromLeaderboard).append("\n"); diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/Wallet.java b/auto-generated/android/src/main/java/io/swagger/client/model/Wallet.java index a5d6f1c25..f8a206869 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/Wallet.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/Wallet.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/model/XAny.java b/auto-generated/android/src/main/java/io/swagger/client/model/XAny.java index 8b373cf1e..995018f55 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/model/XAny.java +++ b/auto-generated/android/src/main/java/io/swagger/client/model/XAny.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/request/DeleteRequest.java b/auto-generated/android/src/main/java/io/swagger/client/request/DeleteRequest.java index 1f775c7f6..f9069f2a1 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/request/DeleteRequest.java +++ b/auto-generated/android/src/main/java/io/swagger/client/request/DeleteRequest.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/request/GetRequest.java b/auto-generated/android/src/main/java/io/swagger/client/request/GetRequest.java index 3ff1e638e..38ac30d7a 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/request/GetRequest.java +++ b/auto-generated/android/src/main/java/io/swagger/client/request/GetRequest.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/request/PatchRequest.java b/auto-generated/android/src/main/java/io/swagger/client/request/PatchRequest.java index 2645e1225..d029b5d15 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/request/PatchRequest.java +++ b/auto-generated/android/src/main/java/io/swagger/client/request/PatchRequest.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/request/PostRequest.java b/auto-generated/android/src/main/java/io/swagger/client/request/PostRequest.java index f014114a0..c8036ffe8 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/request/PostRequest.java +++ b/auto-generated/android/src/main/java/io/swagger/client/request/PostRequest.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/android/src/main/java/io/swagger/client/request/PutRequest.java b/auto-generated/android/src/main/java/io/swagger/client/request/PutRequest.java index 12ca219d6..af199f18f 100644 --- a/auto-generated/android/src/main/java/io/swagger/client/request/PutRequest.java +++ b/auto-generated/android/src/main/java/io/swagger/client/request/PutRequest.java @@ -1,6 +1,6 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/clojure/.swagger-codegen/VERSION b/auto-generated/clojure/.swagger-codegen/VERSION index 855ff9501..a4533be7f 100644 --- a/auto-generated/clojure/.swagger-codegen/VERSION +++ b/auto-generated/clojure/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +2.4.11-SNAPSHOT \ No newline at end of file diff --git a/auto-generated/clojure/project.clj b/auto-generated/clojure/project.clj index 83e89b79e..5cdce8ec6 100644 --- a/auto-generated/clojure/project.clj +++ b/auto-generated/clojure/project.clj @@ -3,7 +3,7 @@ [View Changelog](/app/apiChangelog) - +- #### Getting Started @@ -18,7 +18,7 @@ Most table queries accept `count`, `start`, and `reverse` params. Set `reverse=t 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 +_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 @@ -27,19 +27,19 @@ By default, all data is returned as JSON. Send `?_format=csv` to get CSV data or ##### Trade Data Queries -*This is only a small subset of what is available, to get you started.* +_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) +- [Pricing Data](#!/Quote/Quote_get) -* [Trade Data](#!/Trade/Trade_get) +- [Trade Data](#!/Trade/Trade_get) -* [OrderBook Data](#!/OrderBook/OrderBook_getL2) +- [OrderBook Data](#!/OrderBook/OrderBook_getL2) -* [Settlement Data](#!/Settlement/Settlement_get) +- [Settlement Data](#!/Settlement/Settlement_get) -* [Exchange Statistics](#!/Stats/Stats_history) +- [Exchange Statistics](#!/Stats/Stats_history) Every function of the BitMEX.com platform is exposed here and documented. Many more functions are available. @@ -47,7 +47,7 @@ Every function of the BitMEX.com platform is exposed here and documented. Many m [⇩ Download Swagger JSON](swagger.json) - +- ## All API Endpoints diff --git a/auto-generated/clojure/src/bit_mex_api/api/announcement.clj b/auto-generated/clojure/src/bit_mex_api/api/announcement.clj index 013f88711..16ddefcdf 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/announcement.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/announcement.clj @@ -31,7 +31,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn announcement-get-urgent "Get urgent (banner) announcements." diff --git a/auto-generated/clojure/src/bit_mex_api/api/api_key.clj b/auto-generated/clojure/src/bit_mex_api/api/api_key.clj index 0638ba647..c67647fc5 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/api_key.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/api_key.clj @@ -2,42 +2,6 @@ (:require [bit-mex-api.core :refer [call-api check-required-params with-collection-format]]) (:import (java.io File))) -(defn a-pi-key-disable-with-http-info - "Disable an API Key." - [api-key-id ] - (check-required-params api-key-id) - (call-api "/apiKey/disable" :post - {:path-params {} - :header-params {} - :query-params {} - :form-params {"apiKeyID" api-key-id } - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) - -(defn a-pi-key-disable - "Disable an API Key." - [api-key-id ] - (:data (a-pi-key-disable-with-http-info api-key-id))) - -(defn a-pi-key-enable-with-http-info - "Enable an API Key." - [api-key-id ] - (check-required-params api-key-id) - (call-api "/apiKey/enable" :post - {:path-params {} - :header-params {} - :query-params {} - :form-params {"apiKeyID" api-key-id } - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) - -(defn a-pi-key-enable - "Enable an API Key." - [api-key-id ] - (:data (a-pi-key-enable-with-http-info api-key-id))) - (defn a-pi-key-get-with-http-info "Get your API Keys." ([] (a-pi-key-get-with-http-info nil)) @@ -49,7 +13,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn a-pi-key-get "Get your API Keys." @@ -57,42 +21,3 @@ ([optional-params] (:data (a-pi-key-get-with-http-info optional-params)))) -(defn a-pi-key-new-with-http-info - "Create a new API Key. - API Keys can only be created via the frontend." - ([] (a-pi-key-new-with-http-info nil)) - ([{:keys [name cidr permissions enabled token ]}] - (call-api "/apiKey" :post - {:path-params {} - :header-params {} - :query-params {} - :form-params {"name" name "cidr" cidr "permissions" permissions "enabled" enabled "token" token } - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) - -(defn a-pi-key-new - "Create a new API Key. - API Keys can only be created via the frontend." - ([] (a-pi-key-new nil)) - ([optional-params] - (:data (a-pi-key-new-with-http-info optional-params)))) - -(defn a-pi-key-remove-with-http-info - "Remove an API Key." - [api-key-id ] - (check-required-params api-key-id) - (call-api "/apiKey" :delete - {:path-params {} - :header-params {} - :query-params {} - :form-params {"apiKeyID" api-key-id } - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) - -(defn a-pi-key-remove - "Remove an API Key." - [api-key-id ] - (:data (a-pi-key-remove-with-http-info api-key-id))) - diff --git a/auto-generated/clojure/src/bit_mex_api/api/chat.clj b/auto-generated/clojure/src/bit_mex_api/api/chat.clj index 49f914bec..a18aff04f 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/chat.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/chat.clj @@ -69,7 +69,7 @@ :form-params {"message" message "channelID" channel-id } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn chat-new "Send a chat message." diff --git a/auto-generated/clojure/src/bit_mex_api/api/execution.clj b/auto-generated/clojure/src/bit_mex_api/api/execution.clj index 5fc91ca0e..e7a4bb795 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/execution.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/execution.clj @@ -20,7 +20,7 @@ See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_8_8.html) :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn execution-get "Get all raw executions for your account. @@ -46,7 +46,7 @@ See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_8_8.html) :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn execution-get-trade-history "Get all balance-affecting executions. This includes each trade, insurance charge, and settlement." diff --git a/auto-generated/clojure/src/bit_mex_api/api/notification.clj b/auto-generated/clojure/src/bit_mex_api/api/global_notification.clj similarity index 62% rename from auto-generated/clojure/src/bit_mex_api/api/notification.clj rename to auto-generated/clojure/src/bit_mex_api/api/global_notification.clj index 3fad64d46..fc2fc170b 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/notification.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/global_notification.clj @@ -1,23 +1,23 @@ -(ns bit-mex-api.api.notification +(ns bit-mex-api.api.global-notification (:require [bit-mex-api.core :refer [call-api check-required-params with-collection-format]]) (:import (java.io File))) -(defn notification-get-with-http-info - "Get your current notifications. +(defn global-notification-get-with-http-info + "Get your current GlobalNotifications. This is an upcoming feature and currently does not return data." [] - (call-api "/notification" :get + (call-api "/globalNotification" :get {:path-params {} :header-params {} :query-params {} :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) -(defn notification-get - "Get your current notifications. +(defn global-notification-get + "Get your current GlobalNotifications. This is an upcoming feature and currently does not return data." [] - (:data (notification-get-with-http-info))) + (:data (global-notification-get-with-http-info))) diff --git a/auto-generated/clojure/src/bit_mex_api/api/instrument.clj b/auto-generated/clojure/src/bit_mex_api/api/instrument.clj index fc820e8d0..7f866d9c6 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/instrument.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/instrument.clj @@ -59,7 +59,7 @@ (defn instrument-get-active-intervals-with-http-info "Return all active contract series and interval pairs. - This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index." + This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index." [] (call-api "/instrument/activeIntervals" :get {:path-params {} @@ -72,7 +72,7 @@ (defn instrument-get-active-intervals "Return all active contract series and interval pairs. - This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index." + This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index." [] (:data (instrument-get-active-intervals-with-http-info))) @@ -85,11 +85,11 @@ get the ticks and weights of the constituent exchanges that build the \".XBT\" i A tick with reference `\"BMI\"` and weight `null` is the composite index tick." ([] (instrument-get-composite-index-with-http-info nil)) - ([{:keys [account symbol filter columns count start reverse start-time end-time ]}] + ([{:keys [symbol filter columns count start reverse start-time end-time ]}] (call-api "/instrument/compositeIndex" :get {:path-params {} :header-params {} - :query-params {"account" account "symbol" symbol "filter" filter "columns" columns "count" count "start" start "reverse" reverse "startTime" start-time "endTime" end-time } + :query-params {"symbol" symbol "filter" filter "columns" columns "count" count "start" start "reverse" reverse "startTime" start-time "endTime" end-time } :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] diff --git a/auto-generated/clojure/src/bit_mex_api/api/leaderboard.clj b/auto-generated/clojure/src/bit_mex_api/api/leaderboard.clj index fe6d38a14..bca0750a6 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/leaderboard.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/leaderboard.clj @@ -31,7 +31,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn leaderboard-get-name "Get your alias on the leaderboard." diff --git a/auto-generated/clojure/src/bit_mex_api/api/order.clj b/auto-generated/clojure/src/bit_mex_api/api/order.clj index 35e7b8452..092e0f153 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/order.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/order.clj @@ -14,9 +14,6 @@ already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. -Use the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts. -These fields will round up to the nearest contract. - Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint." ([] (order-amend-with-http-info nil)) @@ -28,7 +25,7 @@ a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing :form-params {"orderID" order-id "origClOrdID" orig-cl-ord-id "clOrdID" cl-ord-id "simpleOrderQty" simple-order-qty "orderQty" order-qty "simpleLeavesQty" simple-leaves-qty "leavesQty" leaves-qty "price" price "stopPx" stop-px "pegOffsetValue" peg-offset-value "text" text } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn order-amend "Amend the quantity or price of an open order. @@ -42,9 +39,6 @@ already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. -Use the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts. -These fields will round up to the nearest contract. - Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint." ([] (order-amend nil)) @@ -63,7 +57,7 @@ a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing :form-params {"orders" orders } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn order-amend-bulk "Amend multiple orders for the same symbol. @@ -84,7 +78,7 @@ a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing :form-params {"orderID" order-id "clOrdID" cl-ord-id "text" text } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn order-cancel "Cancel order(s). Send multiple order IDs to cancel in bulk. @@ -104,7 +98,7 @@ a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing :form-params {"symbol" symbol "filter" filter "text" text } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn order-cancel-all "Cancels all of your orders." @@ -130,7 +124,7 @@ This is also available via [WebSocket](https://www.bitmex.com/app/wsAPI#Dead-Man :form-params {"timeout" timeout } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn order-cancel-all-after "Automatically cancel all your orders after a specified timeout. @@ -157,7 +151,7 @@ This is also available via [WebSocket](https://www.bitmex.com/app/wsAPI#Dead-Man :form-params {"symbol" symbol "price" price } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn order-close-position "Close a position. [Deprecated, use POST /order with execInst: 'Close'] @@ -180,7 +174,7 @@ See th :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn order-get-orders "Get your orders. @@ -203,63 +197,41 @@ All orders require a `symbol`. All other fields are optional except when otherwi These are the valid `ordType`s: -* **Limit**: The default order type. Specify an `orderQty` and `price`. -* **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at +- **Limit**: The default order type. Specify an `orderQty` and `price`. +- **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. -* **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as - permitted by available margin, will become a limit order. The difference between this type and `Market` only - affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, - a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining - quantity in the books as a `Limit`. -* **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered +- **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. - * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. - * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your + - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. + - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. - * `Close` Stops don't require an `orderQty`. See Execution Instructions below. -* **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, + - `Close` Stops don't require an `orderQty`. See Execution Instructions below. +- **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. -* **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. -* **LimitIfTouched**: As above; use for Take Profit Limit orders. +- **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. +- **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). -* **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, +- **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. -* **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill. -* **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. +- **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. -* **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` +- **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will - be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first. -* **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side + be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first. +- **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. - * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger - above or below the `stopPx`. + - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger + above or below the `stopPx`. #### Linked Orders -Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. -Please follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing. - -BitMEX offers four advanced Linked Order types: - -* **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique. - Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of - `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates - for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`. -* **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and - then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes. -* **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then - as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended - down by the execution quantity. -* **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then - as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally - by the fill percentage. +[Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/) #### Trailing Stops @@ -273,8 +245,7 @@ Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities -Send a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency. -This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is. +[Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/) #### Rate Limits @@ -308,7 +279,7 @@ PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"lea :form-params {"symbol" symbol "side" side "simpleOrderQty" simple-order-qty "orderQty" order-qty "price" price "displayQty" display-qty "stopPx" stop-px "clOrdID" cl-ord-id "clOrdLinkID" cl-ord-link-id "pegOffsetValue" peg-offset-value "pegPriceType" peg-price-type "ordType" ord-type "timeInForce" time-in-force "execInst" exec-inst "contingencyType" contingency-type "text" text } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn order-new "Create a new order. @@ -322,63 +293,41 @@ All orders require a `symbol`. All other fields are optional except when otherwi These are the valid `ordType`s: -* **Limit**: The default order type. Specify an `orderQty` and `price`. -* **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at +- **Limit**: The default order type. Specify an `orderQty` and `price`. +- **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. -* **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as - permitted by available margin, will become a limit order. The difference between this type and `Market` only - affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, - a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining - quantity in the books as a `Limit`. -* **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered +- **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. - * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. - * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your + - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. + - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. - * `Close` Stops don't require an `orderQty`. See Execution Instructions below. -* **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, + - `Close` Stops don't require an `orderQty`. See Execution Instructions below. +- **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. -* **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. -* **LimitIfTouched**: As above; use for Take Profit Limit orders. +- **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. +- **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). -* **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, +- **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. -* **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill. -* **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. +- **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. -* **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` +- **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will - be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first. -* **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side + be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first. +- **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. - * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger - above or below the `stopPx`. + - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger + above or below the `stopPx`. #### Linked Orders -Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. -Please follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing. - -BitMEX offers four advanced Linked Order types: - -* **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique. - Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of - `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates - for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`. -* **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and - then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes. -* **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then - as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended - down by the execution quantity. -* **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then - as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally - by the fill percentage. +[Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/) #### Trailing Stops @@ -392,8 +341,7 @@ Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities -Send a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency. -This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is. +[Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/) #### Rate Limits @@ -423,7 +371,7 @@ PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"lea (defn order-new-bulk-with-http-info "Create multiple new orders for the same symbol. - This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. + This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. @@ -441,11 +389,11 @@ For now, only `application/json` is supported on this endpoint." :form-params {"orders" orders } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn order-new-bulk "Create multiple new orders for the same symbol. - This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. + This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. diff --git a/auto-generated/clojure/src/bit_mex_api/api/position.clj b/auto-generated/clojure/src/bit_mex_api/api/position.clj index c764b9e0f..530dd3e0a 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/position.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/position.clj @@ -4,7 +4,40 @@ (defn position-get-with-http-info "Get your positions. - See the FIX Spec for explanations of these fields." + This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below. + +The fields _account_, _symbol_, _currency_ are unique to each position and form its key. + +- **account**: Your unique account ID. +- **symbol**: The contract for this position. +- **currency**: The margin currency for this position. +- **underlying**: Meta data of the _symbol_. +- **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_ +- **commission**: The maximum of the maker, taker, and settlement fee. +- **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage. +- **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit. +- **riskLimit**: This is a function of your _maintMarginReq_. +- **leverage**: 1 / initMarginReq. +- **crossMargin**: True/false depending on whether you set cross margin on this position. +- **deleveragePercentile**: Indicates where your position is in the ADL queue. +- **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position. +- **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed. +- **currentQty**: The current position amount in contracts. +- **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_). +- **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_). +- **realisedCost**: The realised cost of this position calculated with regard to average cost accounting. +- **unrealisedCost**: _currentCost_ - _realisedCost_. +- **grossOpenCost**: The absolute value of your open orders for this symbol. +- **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_). +- **markPrice**: The mark price of the symbol in _quoteCurrency_. +- **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_). +- **homeNotional**: Value of position in units of _underlying_. +- **foreignNotional**: Value of position in units of _quoteCurrency_. +- **realisedPnl**: The negative of _realisedCost_. +- **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_. +- **unrealisedPnl**: _unrealisedGrossPnl_. +- **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated. +- **bankruptPrice**: Once markPrice reaches this price, this position will have no equity." ([] (position-get-with-http-info nil)) ([{:keys [filter columns count ]}] (call-api "/position" :get @@ -14,11 +47,44 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn position-get "Get your positions. - See the FIX Spec for explanations of these fields." + This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below. + +The fields _account_, _symbol_, _currency_ are unique to each position and form its key. + +- **account**: Your unique account ID. +- **symbol**: The contract for this position. +- **currency**: The margin currency for this position. +- **underlying**: Meta data of the _symbol_. +- **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_ +- **commission**: The maximum of the maker, taker, and settlement fee. +- **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage. +- **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit. +- **riskLimit**: This is a function of your _maintMarginReq_. +- **leverage**: 1 / initMarginReq. +- **crossMargin**: True/false depending on whether you set cross margin on this position. +- **deleveragePercentile**: Indicates where your position is in the ADL queue. +- **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position. +- **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed. +- **currentQty**: The current position amount in contracts. +- **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_). +- **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_). +- **realisedCost**: The realised cost of this position calculated with regard to average cost accounting. +- **unrealisedCost**: _currentCost_ - _realisedCost_. +- **grossOpenCost**: The absolute value of your open orders for this symbol. +- **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_). +- **markPrice**: The mark price of the symbol in _quoteCurrency_. +- **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_). +- **homeNotional**: Value of position in units of _underlying_. +- **foreignNotional**: Value of position in units of _quoteCurrency_. +- **realisedPnl**: The negative of _realisedCost_. +- **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_. +- **unrealisedPnl**: _unrealisedGrossPnl_. +- **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated. +- **bankruptPrice**: Once markPrice reaches this price, this position will have no equity." ([] (position-get nil)) ([optional-params] (:data (position-get-with-http-info optional-params)))) @@ -35,7 +101,7 @@ :form-params {"symbol" symbol "enabled" enabled } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn position-isolate-margin "Enable isolated margin or cross margin per-position." @@ -54,7 +120,7 @@ :form-params {"symbol" symbol "amount" amount } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn position-transfer-isolated-margin "Transfer equity in or out of a position." @@ -72,7 +138,7 @@ :form-params {"symbol" symbol "leverage" leverage } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn position-update-leverage "Choose leverage for a position." @@ -90,7 +156,7 @@ :form-params {"symbol" symbol "riskLimit" risk-limit } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn position-update-risk-limit "Update your risk limit." diff --git a/auto-generated/clojure/src/bit_mex_api/api/quote.clj b/auto-generated/clojure/src/bit_mex_api/api/quote.clj index 461d79f98..04d075bba 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/quote.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/quote.clj @@ -22,7 +22,8 @@ (:data (quote-get-with-http-info optional-params)))) (defn quote-get-bucketed-with-http-info - "Get previous quotes in time buckets." + "Get previous quotes in time buckets. + Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint." ([] (quote-get-bucketed-with-http-info nil)) ([{:keys [bin-size partial symbol filter columns count start reverse start-time end-time ]}] (call-api "/quote/bucketed" :get @@ -35,7 +36,8 @@ :auth-names []}))) (defn quote-get-bucketed - "Get previous quotes in time buckets." + "Get previous quotes in time buckets. + Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint." ([] (quote-get-bucketed nil)) ([optional-params] (:data (quote-get-bucketed-with-http-info optional-params)))) diff --git a/auto-generated/clojure/src/bit_mex_api/api/trade.clj b/auto-generated/clojure/src/bit_mex_api/api/trade.clj index fa365704d..9c26c9796 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/trade.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/trade.clj @@ -28,7 +28,10 @@ See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AE_6569.h (:data (trade-get-with-http-info optional-params)))) (defn trade-get-bucketed-with-http-info - "Get previous trades in time buckets." + "Get previous trades in time buckets. + Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. + +Also note the `open` price is equal to the `close` price of the previous timeframe bucket." ([] (trade-get-bucketed-with-http-info nil)) ([{:keys [bin-size partial symbol filter columns count start reverse start-time end-time ]}] (call-api "/trade/bucketed" :get @@ -41,7 +44,10 @@ See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AE_6569.h :auth-names []}))) (defn trade-get-bucketed - "Get previous trades in time buckets." + "Get previous trades in time buckets. + Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. + +Also note the `open` price is equal to the `close` price of the previous timeframe bucket." ([] (trade-get-bucketed nil)) ([optional-params] (:data (trade-get-bucketed-with-http-info optional-params)))) diff --git a/auto-generated/clojure/src/bit_mex_api/api/user.clj b/auto-generated/clojure/src/bit_mex_api/api/user.clj index e179c1c9f..d371e6b0b 100644 --- a/auto-generated/clojure/src/bit_mex_api/api/user.clj +++ b/auto-generated/clojure/src/bit_mex_api/api/user.clj @@ -22,7 +22,7 @@ (defn user-check-referral-code-with-http-info "Check if a referral code is valid. - If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404." + If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid." ([] (user-check-referral-code-with-http-info nil)) ([{:keys [referral-code ]}] (call-api "/user/checkReferralCode" :get @@ -36,11 +36,29 @@ (defn user-check-referral-code "Check if a referral code is valid. - If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404." + If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid." ([] (user-check-referral-code nil)) ([optional-params] (:data (user-check-referral-code-with-http-info optional-params)))) +(defn user-communication-token-with-http-info + "Register your communication token for mobile clients" + [token platform-agent ] + (check-required-params token platform-agent) + (call-api "/user/communicationToken" :post + {:path-params {} + :header-params {} + :query-params {} + :form-params {"token" token "platformAgent" platform-agent } + :content-types ["application/json" "application/x-www-form-urlencoded"] + :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) + +(defn user-communication-token + "Register your communication token for mobile clients" + [token platform-agent ] + (:data (user-communication-token-with-http-info token platform-agent))) + (defn user-confirm-with-http-info "Confirm your email address with a token." [token ] @@ -59,26 +77,6 @@ [token ] (:data (user-confirm-with-http-info token))) -(defn user-confirm-enable-tfa-with-http-info - "Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint." - ([token ] (user-confirm-enable-tfa-with-http-info token nil)) - ([token {:keys [type ]}] - (check-required-params token) - (call-api "/user/confirmEnableTFA" :post - {:path-params {} - :header-params {} - :query-params {} - :form-params {"type" type "token" token } - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) - -(defn user-confirm-enable-tfa - "Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint." - ([token ] (user-confirm-enable-tfa token nil)) - ([token optional-params] - (:data (user-confirm-enable-tfa-with-http-info token optional-params)))) - (defn user-confirm-withdrawal-with-http-info "Confirm a withdrawal." [token ] @@ -97,26 +95,6 @@ [token ] (:data (user-confirm-withdrawal-with-http-info token))) -(defn user-disable-tfa-with-http-info - "Disable two-factor auth for this account." - ([token ] (user-disable-tfa-with-http-info token nil)) - ([token {:keys [type ]}] - (check-required-params token) - (call-api "/user/disableTFA" :post - {:path-params {} - :header-params {} - :query-params {} - :form-params {"type" type "token" token } - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) - -(defn user-disable-tfa - "Disable two-factor auth for this account." - ([token ] (user-disable-tfa token nil)) - ([token optional-params] - (:data (user-disable-tfa-with-http-info token optional-params)))) - (defn user-get-with-http-info "Get your user model." [] @@ -127,7 +105,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn user-get "Get your user model." @@ -144,7 +122,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn user-get-affiliate-status "Get your current affiliate/referral status." @@ -161,7 +139,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) (defn user-get-commission "Get your account's commission status." @@ -179,7 +157,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn user-get-deposit-address "Get a deposit address." @@ -187,6 +165,24 @@ ([optional-params] (:data (user-get-deposit-address-with-http-info optional-params)))) +(defn user-get-execution-history-with-http-info + "Get the execution history by day." + [symbol timestamp ] + (check-required-params symbol timestamp) + (call-api "/user/executionHistory" :get + {:path-params {} + :header-params {} + :query-params {"symbol" symbol "timestamp" timestamp } + :form-params {} + :content-types ["application/json" "application/x-www-form-urlencoded"] + :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) + +(defn user-get-execution-history + "Get the execution history by day." + [symbol timestamp ] + (:data (user-get-execution-history-with-http-info symbol timestamp))) + (defn user-get-margin-with-http-info "Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies." ([] (user-get-margin-with-http-info nil)) @@ -198,7 +194,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn user-get-margin "Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies." @@ -206,6 +202,23 @@ ([optional-params] (:data (user-get-margin-with-http-info optional-params)))) +(defn user-get-quote-fill-ratio-with-http-info + "Get 7 days worth of Quote Fill Ratio statistics." + [] + (call-api "/user/quoteFillRatio" :get + {:path-params {} + :header-params {} + :query-params {} + :form-params {} + :content-types ["application/json" "application/x-www-form-urlencoded"] + :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] + :auth-names ["apiExpires" "apiKey" "apiSignature"]})) + +(defn user-get-quote-fill-ratio + "Get 7 days worth of Quote Fill Ratio statistics." + [] + (:data (user-get-quote-fill-ratio-with-http-info))) + (defn user-get-wallet-with-http-info "Get your current wallet information." ([] (user-get-wallet-with-http-info nil)) @@ -217,7 +230,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn user-get-wallet "Get your current wallet information." @@ -228,15 +241,15 @@ (defn user-get-wallet-history-with-http-info "Get a history of all of your wallet transactions (deposits, withdrawals, PNL)." ([] (user-get-wallet-history-with-http-info nil)) - ([{:keys [currency ]}] + ([{:keys [currency count start ]}] (call-api "/user/walletHistory" :get {:path-params {} :header-params {} - :query-params {"currency" currency } + :query-params {"currency" currency "count" count "start" start } :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn user-get-wallet-history "Get a history of all of your wallet transactions (deposits, withdrawals, PNL)." @@ -255,7 +268,7 @@ :form-params {} :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn user-get-wallet-summary "Get a summary of all of your wallet transactions (deposits, withdrawals, PNL)." @@ -280,23 +293,6 @@ [] (:data (user-logout-with-http-info))) -(defn user-logout-all-with-http-info - "Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices." - [] - (call-api "/user/logoutAll" :post - {:path-params {} - :header-params {} - :query-params {} - :form-params {} - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]})) - -(defn user-logout-all - "Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices." - [] - (:data (user-logout-all-with-http-info))) - (defn user-min-withdrawal-fee-with-http-info "Get the minimum withdrawal fee for a currency. This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency." @@ -318,45 +314,24 @@ ([optional-params] (:data (user-min-withdrawal-fee-with-http-info optional-params)))) -(defn user-request-enable-tfa-with-http-info - "Get secret key for setting up two-factor auth. - Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled." - ([] (user-request-enable-tfa-with-http-info nil)) - ([{:keys [type ]}] - (call-api "/user/requestEnableTFA" :post - {:path-params {} - :header-params {} - :query-params {} - :form-params {"type" type } - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) - -(defn user-request-enable-tfa - "Get secret key for setting up two-factor auth. - Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled." - ([] (user-request-enable-tfa nil)) - ([optional-params] - (:data (user-request-enable-tfa-with-http-info optional-params)))) - (defn user-request-withdrawal-with-http-info "Request a withdrawal to an external wallet. - This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission." + This will send a confirmation email to the email address on record." ([currency amount address ] (user-request-withdrawal-with-http-info currency amount address nil)) - ([currency amount address {:keys [otp-token fee ]}] + ([currency amount address {:keys [otp-token fee text ]}] (check-required-params currency amount address) (call-api "/user/requestWithdrawal" :post {:path-params {} :header-params {} :query-params {} - :form-params {"otpToken" otp-token "currency" currency "amount" amount "address" address "fee" fee } + :form-params {"otpToken" otp-token "currency" currency "amount" amount "address" address "fee" fee "text" text } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn user-request-withdrawal "Request a withdrawal to an external wallet. - This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission." + This will send a confirmation email to the email address on record." ([currency amount address ] (user-request-withdrawal currency amount address nil)) ([currency amount address optional-params] (:data (user-request-withdrawal-with-http-info currency amount address optional-params)))) @@ -373,7 +348,7 @@ :form-params {"prefs" prefs "overwrite" overwrite } :content-types ["application/json" "application/x-www-form-urlencoded"] :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) (defn user-save-preferences "Save user preferences." @@ -381,22 +356,3 @@ ([prefs optional-params] (:data (user-save-preferences-with-http-info prefs optional-params)))) -(defn user-update-with-http-info - "Update your password, name, and other attributes." - ([] (user-update-with-http-info nil)) - ([{:keys [firstname lastname old-password new-password new-password-confirm username country pgp-pub-key ]}] - (call-api "/user" :put - {:path-params {} - :header-params {} - :query-params {} - :form-params {"firstname" firstname "lastname" lastname "oldPassword" old-password "newPassword" new-password "newPasswordConfirm" new-password-confirm "username" username "country" country "pgpPubKey" pgp-pub-key } - :content-types ["application/json" "application/x-www-form-urlencoded"] - :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] - :auth-names ["apiKey" "apiNonce" "apiSignature"]}))) - -(defn user-update - "Update your password, name, and other attributes." - ([] (user-update nil)) - ([optional-params] - (:data (user-update-with-http-info optional-params)))) - diff --git a/auto-generated/clojure/src/bit_mex_api/api/user_event.clj b/auto-generated/clojure/src/bit_mex_api/api/user_event.clj new file mode 100644 index 000000000..ae4c4bd43 --- /dev/null +++ b/auto-generated/clojure/src/bit_mex_api/api/user_event.clj @@ -0,0 +1,23 @@ +(ns bit-mex-api.api.user-event + (:require [bit-mex-api.core :refer [call-api check-required-params with-collection-format]]) + (:import (java.io File))) + +(defn user-event-get-with-http-info + "Get your user events" + ([] (user-event-get-with-http-info nil)) + ([{:keys [count start-id ]}] + (call-api "/userEvent" :get + {:path-params {} + :header-params {} + :query-params {"count" count "startId" start-id } + :form-params {} + :content-types ["application/json" "application/x-www-form-urlencoded"] + :accepts ["application/json" "application/xml" "text/xml" "application/javascript" "text/javascript"] + :auth-names ["apiExpires" "apiKey" "apiSignature"]}))) + +(defn user-event-get + "Get your user events" + ([] (user-event-get nil)) + ([optional-params] + (:data (user-event-get-with-http-info optional-params)))) + diff --git a/auto-generated/clojure/src/bit_mex_api/core.clj b/auto-generated/clojure/src/bit_mex_api/core.clj index bd619ae45..f2ec1ab90 100644 --- a/auto-generated/clojure/src/bit_mex_api/core.clj +++ b/auto-generated/clojure/src/bit_mex_api/core.clj @@ -8,18 +8,18 @@ (java.text SimpleDateFormat))) (def auth-definitions - {"apiKey" {:type :api-key :in :header :param-name "api-key"} - "apiNonce" {:type :api-key :in :header :param-name "api-nonce"} + {"apiExpires" {:type :api-key :in :header :param-name "api-expires"} + "apiKey" {:type :api-key :in :header :param-name "api-key"} "apiSignature" {:type :api-key :in :header :param-name "api-signature"}}) (def default-api-context "Default API context." - {:base-url "https://localhost/api/v1" + {:base-url "https://www.bitmex.com/api/v1" :date-format "yyyy-MM-dd" :datetime-format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" :debug false - :auths {"apiKey" nil - "apiNonce" nil + :auths {"apiExpires" nil + "apiKey" nil "apiSignature" nil}}) (def ^:dynamic *api-context* diff --git a/auto-generated/cpprest/.swagger-codegen/VERSION b/auto-generated/cpprest/.swagger-codegen/VERSION index 855ff9501..a4533be7f 100644 --- a/auto-generated/cpprest/.swagger-codegen/VERSION +++ b/auto-generated/cpprest/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +2.4.11-SNAPSHOT \ No newline at end of file diff --git a/auto-generated/cpprest/ApiClient.cpp b/auto-generated/cpprest/ApiClient.cpp index 15ab01b8d..5994ec4ef 100644 --- a/auto-generated/cpprest/ApiClient.cpp +++ b/auto-generated/cpprest/ApiClient.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -43,6 +43,14 @@ utility::string_t ApiClient::parameterToString(utility::string_t value) { return value; } + +utility::string_t ApiClient::parameterToString(bool value) +{ + std::stringstream valueAsStringStream; + valueAsStringStream << (value ? "true" : "false"); + return utility::conversions::to_string_t(valueAsStringStream.str()); +} + utility::string_t ApiClient::parameterToString(int64_t value) { std::stringstream valueAsStringStream; @@ -144,7 +152,20 @@ pplx::task ApiClient::callApi( if (!formParams.empty()) { request.set_body(body_data); - } + } + } + else if (contentType == utility::conversions::to_string_t("multipart/form-data")) + { + MultipartFormData uploadData; + for (auto& kvp : formParams) + { + uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second)); + } + std::stringstream data; + uploadData.writeTo(data); + auto bodyString = data.str(); + auto length = bodyString.size(); + request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, utility::conversions::to_string_t("multipart/form-data; boundary=") + uploadData.getBoundary()); } else { diff --git a/auto-generated/cpprest/ApiClient.h b/auto-generated/cpprest/ApiClient.h index 668c79ff9..4c40265e5 100644 --- a/auto-generated/cpprest/ApiClient.h +++ b/auto-generated/cpprest/ApiClient.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -48,6 +48,7 @@ class ApiClient void setConfiguration(std::shared_ptr configuration); static utility::string_t parameterToString(utility::string_t value); + static utility::string_t parameterToString(bool value); static utility::string_t parameterToString(int32_t value); static utility::string_t parameterToString(int64_t value); static utility::string_t parameterToString(float value); diff --git a/auto-generated/cpprest/ApiConfiguration.cpp b/auto-generated/cpprest/ApiConfiguration.cpp index 59f32ab71..7ecc4f3cb 100644 --- a/auto-generated/cpprest/ApiConfiguration.cpp +++ b/auto-generated/cpprest/ApiConfiguration.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/ApiConfiguration.h b/auto-generated/cpprest/ApiConfiguration.h index 2395a6c58..de06af208 100644 --- a/auto-generated/cpprest/ApiConfiguration.h +++ b/auto-generated/cpprest/ApiConfiguration.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/ApiException.cpp b/auto-generated/cpprest/ApiException.cpp index 0043ae8f3..2f91bd5d9 100644 --- a/auto-generated/cpprest/ApiException.cpp +++ b/auto-generated/cpprest/ApiException.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/ApiException.h b/auto-generated/cpprest/ApiException.h index 7a10cc1d9..9d21fa8ef 100644 --- a/auto-generated/cpprest/ApiException.h +++ b/auto-generated/cpprest/ApiException.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/CMakeLists.txt b/auto-generated/cpprest/CMakeLists.txt index d749ab31f..d6c71fffa 100644 --- a/auto-generated/cpprest/CMakeLists.txt +++ b/auto-generated/cpprest/CMakeLists.txt @@ -1,6 +1,6 @@ # # 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. +# ## 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. # # OpenAPI spec version: 1.0.0 # diff --git a/auto-generated/cpprest/HttpContent.cpp b/auto-generated/cpprest/HttpContent.cpp index 4af6341ac..15c65ac2a 100644 --- a/auto-generated/cpprest/HttpContent.cpp +++ b/auto-generated/cpprest/HttpContent.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/HttpContent.h b/auto-generated/cpprest/HttpContent.h index 9d6b17730..edc20bbc3 100644 --- a/auto-generated/cpprest/HttpContent.h +++ b/auto-generated/cpprest/HttpContent.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/IHttpBody.h b/auto-generated/cpprest/IHttpBody.h index 468495e20..deee0ddbc 100644 --- a/auto-generated/cpprest/IHttpBody.h +++ b/auto-generated/cpprest/IHttpBody.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/JsonBody.cpp b/auto-generated/cpprest/JsonBody.cpp index 23a15e325..f64d48c9c 100644 --- a/auto-generated/cpprest/JsonBody.cpp +++ b/auto-generated/cpprest/JsonBody.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/JsonBody.h b/auto-generated/cpprest/JsonBody.h index 77aecee86..95a4ef6dc 100644 --- a/auto-generated/cpprest/JsonBody.h +++ b/auto-generated/cpprest/JsonBody.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/ModelBase.cpp b/auto-generated/cpprest/ModelBase.cpp index 33840b654..aaf4b9af7 100644 --- a/auto-generated/cpprest/ModelBase.cpp +++ b/auto-generated/cpprest/ModelBase.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/ModelBase.h b/auto-generated/cpprest/ModelBase.h index 61fa5959e..aa30650fa 100644 --- a/auto-generated/cpprest/ModelBase.h +++ b/auto-generated/cpprest/ModelBase.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/MultipartFormData.cpp b/auto-generated/cpprest/MultipartFormData.cpp index dfd4ae1e8..064324970 100644 --- a/auto-generated/cpprest/MultipartFormData.cpp +++ b/auto-generated/cpprest/MultipartFormData.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -71,7 +71,7 @@ void MultipartFormData::writeTo( std::ostream& target ) std::shared_ptr content = m_Contents[i]; // boundary - target << "\r\n" << "--" << utility::conversions::to_utf8string( m_Boundary ) << "\r\n"; + target << (i > 0 ? "\r\n" : "") << "--" << utility::conversions::to_utf8string( m_Boundary ) << "\r\n"; // headers target << "Content-Disposition: " << utility::conversions::to_utf8string( content->getContentDisposition() ); diff --git a/auto-generated/cpprest/MultipartFormData.h b/auto-generated/cpprest/MultipartFormData.h index 51a3041d3..9d917e99c 100644 --- a/auto-generated/cpprest/MultipartFormData.h +++ b/auto-generated/cpprest/MultipartFormData.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/Object.cpp b/auto-generated/cpprest/Object.cpp index 2d717aef1..ab3da0ee6 100644 --- a/auto-generated/cpprest/Object.cpp +++ b/auto-generated/cpprest/Object.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/Object.h b/auto-generated/cpprest/Object.h index 5c42af1e4..d599547cb 100644 --- a/auto-generated/cpprest/Object.h +++ b/auto-generated/cpprest/Object.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/APIKeyApi.cpp b/auto-generated/cpprest/api/APIKeyApi.cpp index e4ba53ab4..8c0c10850 100644 --- a/auto-generated/cpprest/api/APIKeyApi.cpp +++ b/auto-generated/cpprest/api/APIKeyApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -36,453 +36,7 @@ APIKeyApi::~APIKeyApi() { } -pplx::task> APIKeyApi::aPIKey_disable(utility::string_t apiKeyID) -{ - - - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/apiKey/disable"); - - std::map queryParams; - std::map headerParams( apiConfiguration->getDefaultHeaders() ); - std::map formParams; - std::map> fileParams; - - std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/javascript") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/javascript") ); - - utility::string_t responseHttpContentType; - - // use JSON if possible - if ( responseHttpContentTypes.size() == 0 ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( responseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( responseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("APIKeyApi->aPIKey_disable does not produce any supported media type")); - } - - headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; - - std::unordered_set consumeHttpContentTypes; - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - { - formParams[ utility::conversions::to_string_t("apiKeyID") ] = ApiClient::parameterToString(apiKeyID); - } - - std::shared_ptr httpBody; - utility::string_t requestHttpContentType; - - // use JSON if possible - if ( consumeHttpContentTypes.size() == 0 || consumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( consumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("APIKeyApi->aPIKey_disable does not consume any supported media type")); - } - - // authentication (apiKey) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; - } - } - // authentication (apiNonce) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; - } - } - // authentication (apiSignature) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; - } - } - - return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) - .then([=](web::http::http_response response) - { - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (response.status_code() >= 400) - { - throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling aPIKey_disable: ") + response.reason_phrase() - , std::make_shared(response.extract_utf8string(true).get())); - } - - // check response content type - if(response.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t contentType = response.headers()[utility::conversions::to_string_t("Content-Type")]; - if( contentType.find(responseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_disable: unexpected response type: ") + contentType - , std::make_shared(response.extract_utf8string(true).get())); - } - } - - return response.extract_string(); - }) - .then([=](utility::string_t response) - { - std::shared_ptr result(new APIKey()); - - if(responseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value json = web::json::value::parse(response); - - result->fromJson(json); - } - // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_disable: unsupported response type")); - } - - return result; - }); -} -pplx::task> APIKeyApi::aPIKey_enable(utility::string_t apiKeyID) -{ - - - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/apiKey/enable"); - - std::map queryParams; - std::map headerParams( apiConfiguration->getDefaultHeaders() ); - std::map formParams; - std::map> fileParams; - - std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/javascript") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/javascript") ); - - utility::string_t responseHttpContentType; - - // use JSON if possible - if ( responseHttpContentTypes.size() == 0 ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( responseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( responseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("APIKeyApi->aPIKey_enable does not produce any supported media type")); - } - - headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; - - std::unordered_set consumeHttpContentTypes; - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - { - formParams[ utility::conversions::to_string_t("apiKeyID") ] = ApiClient::parameterToString(apiKeyID); - } - - std::shared_ptr httpBody; - utility::string_t requestHttpContentType; - - // use JSON if possible - if ( consumeHttpContentTypes.size() == 0 || consumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( consumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("APIKeyApi->aPIKey_enable does not consume any supported media type")); - } - - // authentication (apiKey) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; - } - } - // authentication (apiNonce) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; - } - } - // authentication (apiSignature) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; - } - } - - return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) - .then([=](web::http::http_response response) - { - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (response.status_code() >= 400) - { - throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling aPIKey_enable: ") + response.reason_phrase() - , std::make_shared(response.extract_utf8string(true).get())); - } - - // check response content type - if(response.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t contentType = response.headers()[utility::conversions::to_string_t("Content-Type")]; - if( contentType.find(responseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_enable: unexpected response type: ") + contentType - , std::make_shared(response.extract_utf8string(true).get())); - } - } - - return response.extract_string(); - }) - .then([=](utility::string_t response) - { - std::shared_ptr result(new APIKey()); - - if(responseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value json = web::json::value::parse(response); - - result->fromJson(json); - } - // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_enable: unsupported response type")); - } - - return result; - }); -} -pplx::task>> APIKeyApi::aPIKey_get(boost::optional reverse) -{ - - - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/apiKey"); - - std::map queryParams; - std::map headerParams( apiConfiguration->getDefaultHeaders() ); - std::map formParams; - std::map> fileParams; - - std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/javascript") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/javascript") ); - - utility::string_t responseHttpContentType; - - // use JSON if possible - if ( responseHttpContentTypes.size() == 0 ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( responseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( responseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("APIKeyApi->aPIKey_get does not produce any supported media type")); - } - - headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; - - std::unordered_set consumeHttpContentTypes; - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - if (reverse) - { - queryParams[utility::conversions::to_string_t("reverse")] = ApiClient::parameterToString(*reverse); - } - - std::shared_ptr httpBody; - utility::string_t requestHttpContentType; - - // use JSON if possible - if ( consumeHttpContentTypes.size() == 0 || consumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( consumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("APIKeyApi->aPIKey_get does not consume any supported media type")); - } - - // authentication (apiKey) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; - } - } - // authentication (apiNonce) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; - } - } - // authentication (apiSignature) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; - } - } - - return m_ApiClient->callApi(path, utility::conversions::to_string_t("GET"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) - .then([=](web::http::http_response response) - { - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (response.status_code() >= 400) - { - throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling aPIKey_get: ") + response.reason_phrase() - , std::make_shared(response.extract_utf8string(true).get())); - } - - // check response content type - if(response.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t contentType = response.headers()[utility::conversions::to_string_t("Content-Type")]; - if( contentType.find(responseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_get: unexpected response type: ") + contentType - , std::make_shared(response.extract_utf8string(true).get())); - } - } - - return response.extract_string(); - }) - .then([=](utility::string_t response) - { - std::vector> result; - - if(responseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value json = web::json::value::parse(response); - - for( auto& item : json.as_array() ) - { - std::shared_ptr itemObj(new APIKey()); - itemObj->fromJson(item); - result.push_back(itemObj); - - } - - } - // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_get: unsupported response type")); - } - - return result; - }); -} -pplx::task> APIKeyApi::aPIKey_new(boost::optional name, boost::optional cidr, boost::optional permissions, boost::optional enabled, boost::optional token) +pplx::task>> APIKeyApi::aPIKey_get(boost::optional reverse) { @@ -520,7 +74,7 @@ pplx::task> APIKeyApi::aPIKey_new(boost::optionalaPIKey_new does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("APIKeyApi->aPIKey_get does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -529,25 +83,9 @@ pplx::task> APIKeyApi::aPIKey_new(boost::optional httpBody; @@ -565,155 +103,17 @@ pplx::task> APIKeyApi::aPIKey_new(boost::optionalaPIKey_new does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("APIKeyApi->aPIKey_get does not consume any supported media type")); } - // authentication (apiKey) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; - } - } - // authentication (apiNonce) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; - } - } - // authentication (apiSignature) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; - } - } - - return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) - .then([=](web::http::http_response response) - { - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (response.status_code() >= 400) - { - throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling aPIKey_new: ") + response.reason_phrase() - , std::make_shared(response.extract_utf8string(true).get())); - } - - // check response content type - if(response.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t contentType = response.headers()[utility::conversions::to_string_t("Content-Type")]; - if( contentType.find(responseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_new: unexpected response type: ") + contentType - , std::make_shared(response.extract_utf8string(true).get())); - } - } - - return response.extract_string(); - }) - .then([=](utility::string_t response) - { - std::shared_ptr result(new APIKey()); - - if(responseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value json = web::json::value::parse(response); - - result->fromJson(json); - } - // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_new: unsupported response type")); + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } - - return result; - }); -} -pplx::task> APIKeyApi::aPIKey_remove(utility::string_t apiKeyID) -{ - - - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/apiKey"); - - std::map queryParams; - std::map headerParams( apiConfiguration->getDefaultHeaders() ); - std::map formParams; - std::map> fileParams; - - std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/javascript") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/javascript") ); - - utility::string_t responseHttpContentType; - - // use JSON if possible - if ( responseHttpContentTypes.size() == 0 ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( responseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( responseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("APIKeyApi->aPIKey_remove does not produce any supported media type")); - } - - headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; - - std::unordered_set consumeHttpContentTypes; - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - { - formParams[ utility::conversions::to_string_t("apiKeyID") ] = ApiClient::parameterToString(apiKeyID); - } - - std::shared_ptr httpBody; - utility::string_t requestHttpContentType; - - // use JSON if possible - if ( consumeHttpContentTypes.size() == 0 || consumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( consumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("APIKeyApi->aPIKey_remove does not consume any supported media type")); } - // authentication (apiKey) required { utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); @@ -722,14 +122,6 @@ pplx::task> APIKeyApi::aPIKey_remove(utilit headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } - // authentication (apiNonce) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; - } - } // authentication (apiSignature) required { utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); @@ -739,7 +131,7 @@ pplx::task> APIKeyApi::aPIKey_remove(utilit } } - return m_ApiClient->callApi(path, utility::conversions::to_string_t("DELETE"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) + return m_ApiClient->callApi(path, utility::conversions::to_string_t("GET"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) .then([=](web::http::http_response response) { // 1xx - informational : OK @@ -750,7 +142,7 @@ pplx::task> APIKeyApi::aPIKey_remove(utilit if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling aPIKey_remove: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling aPIKey_get: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -761,7 +153,7 @@ pplx::task> APIKeyApi::aPIKey_remove(utilit if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_remove: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling aPIKey_get: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -770,13 +162,20 @@ pplx::task> APIKeyApi::aPIKey_remove(utilit }) .then([=](utility::string_t response) { - std::shared_ptr result(new Inline_response_200()); + std::vector> result; if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - result->fromJson(json); + for( auto& item : json.as_array() ) + { + std::shared_ptr itemObj(new APIKey()); + itemObj->fromJson(item); + result.push_back(itemObj); + + } + } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -785,7 +184,7 @@ pplx::task> APIKeyApi::aPIKey_remove(utilit else { throw ApiException(500 - , utility::conversions::to_string_t("error calling aPIKey_remove: unsupported response type")); + , utility::conversions::to_string_t("error calling aPIKey_get: unsupported response type")); } return result; diff --git a/auto-generated/cpprest/api/APIKeyApi.h b/auto-generated/cpprest/api/APIKeyApi.h index f55eaacb0..2b1440a7b 100644 --- a/auto-generated/cpprest/api/APIKeyApi.h +++ b/auto-generated/cpprest/api/APIKeyApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -24,8 +24,6 @@ #include "APIKey.h" #include "Error.h" -#include "Inline_response_200.h" -#include #include @@ -42,26 +40,6 @@ class APIKeyApi APIKeyApi( std::shared_ptr apiClient ); virtual ~APIKeyApi(); /// - /// Disable an API Key. - /// - /// - /// - /// - /// API Key ID (public component). - pplx::task> aPIKey_disable( - utility::string_t apiKeyID - ); - /// - /// Enable an API Key. - /// - /// - /// - /// - /// API Key ID (public component). - pplx::task> aPIKey_enable( - utility::string_t apiKeyID - ); - /// /// Get your API Keys. /// /// @@ -71,34 +49,6 @@ class APIKeyApi pplx::task>> aPIKey_get( boost::optional reverse ); - /// - /// Create a new API Key. - /// - /// - /// API Keys can only be created via the frontend. - /// - /// Key name. This name is for reference only. (optional) - /// CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. <a href=\"http://software77.net/cidr-101.html\">More on CIDR blocks</a> (optional) - /// Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"]. (optional) - /// Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. (optional, default to false) - /// OTP Token (YubiKey, Google Authenticator) (optional) - pplx::task> aPIKey_new( - boost::optional name, - boost::optional cidr, - boost::optional permissions, - boost::optional enabled, - boost::optional token - ); - /// - /// Remove an API Key. - /// - /// - /// - /// - /// API Key ID (public component). - pplx::task> aPIKey_remove( - utility::string_t apiKeyID - ); protected: std::shared_ptr m_ApiClient; diff --git a/auto-generated/cpprest/api/AnnouncementApi.cpp b/auto-generated/cpprest/api/AnnouncementApi.cpp index b640d65bf..5f39fc09c 100644 --- a/auto-generated/cpprest/api/AnnouncementApi.cpp +++ b/auto-generated/cpprest/api/AnnouncementApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -232,20 +232,20 @@ pplx::task>> AnnouncementApi::announce throw ApiException(415, utility::conversions::to_string_t("AnnouncementApi->announcement_getUrgent does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required diff --git a/auto-generated/cpprest/api/AnnouncementApi.h b/auto-generated/cpprest/api/AnnouncementApi.h index 7be93fe3f..a44a57026 100644 --- a/auto-generated/cpprest/api/AnnouncementApi.h +++ b/auto-generated/cpprest/api/AnnouncementApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/ChatApi.cpp b/auto-generated/cpprest/api/ChatApi.cpp index 9969ad025..275aa80f3 100644 --- a/auto-generated/cpprest/api/ChatApi.cpp +++ b/auto-generated/cpprest/api/ChatApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -496,20 +496,20 @@ pplx::task> ChatApi::chat_new(utility::string_t message, b throw ApiException(415, utility::conversions::to_string_t("ChatApi->chat_new does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required diff --git a/auto-generated/cpprest/api/ChatApi.h b/auto-generated/cpprest/api/ChatApi.h index c8af1ea2e..e3e0c668f 100644 --- a/auto-generated/cpprest/api/ChatApi.h +++ b/auto-generated/cpprest/api/ChatApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/ExecutionApi.cpp b/auto-generated/cpprest/api/ExecutionApi.cpp index 5a1f72ecb..6fd83f798 100644 --- a/auto-generated/cpprest/api/ExecutionApi.cpp +++ b/auto-generated/cpprest/api/ExecutionApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -134,20 +134,20 @@ pplx::task>> ExecutionApi::execution_get( throw ApiException(415, utility::conversions::to_string_t("ExecutionApi->execution_get does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -316,20 +316,20 @@ pplx::task>> ExecutionApi::execution_getT throw ApiException(415, utility::conversions::to_string_t("ExecutionApi->execution_getTradeHistory does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required diff --git a/auto-generated/cpprest/api/ExecutionApi.h b/auto-generated/cpprest/api/ExecutionApi.h index 535e550bf..26623ff28 100644 --- a/auto-generated/cpprest/api/ExecutionApi.h +++ b/auto-generated/cpprest/api/ExecutionApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -46,7 +46,7 @@ class ExecutionApi /// /// This returns all raw transactions, which includes order opening and cancelation, and order status changes. It can be quite noisy. More focused information is available at `/execution/tradeHistory`. You may also use the `filter` param to target your query. Specify an array as a filter value, such as `{\"execType\": [\"Settlement\", \"Trade\"]}` to filter on multiple values. See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_8_8.html) for explanations of these fields. /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) @@ -70,7 +70,7 @@ class ExecutionApi /// /// /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) diff --git a/auto-generated/cpprest/api/FundingApi.cpp b/auto-generated/cpprest/api/FundingApi.cpp index 227862583..d074ee78d 100644 --- a/auto-generated/cpprest/api/FundingApi.cpp +++ b/auto-generated/cpprest/api/FundingApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/FundingApi.h b/auto-generated/cpprest/api/FundingApi.h index be0a03e31..332379a7b 100644 --- a/auto-generated/cpprest/api/FundingApi.h +++ b/auto-generated/cpprest/api/FundingApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -46,7 +46,7 @@ class FundingApi /// /// /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) diff --git a/auto-generated/cpprest/api/NotificationApi.cpp b/auto-generated/cpprest/api/GlobalNotificationApi.cpp similarity index 72% rename from auto-generated/cpprest/api/NotificationApi.cpp rename to auto-generated/cpprest/api/GlobalNotificationApi.cpp index 6e67a6ab9..079ef8437 100644 --- a/auto-generated/cpprest/api/NotificationApi.cpp +++ b/auto-generated/cpprest/api/GlobalNotificationApi.cpp @@ -1,17 +1,17 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -#include "NotificationApi.h" +#include "GlobalNotificationApi.h" #include "IHttpBody.h" #include "JsonBody.h" #include "MultipartFormData.h" @@ -27,21 +27,21 @@ namespace api { using namespace io::swagger::client::model; -NotificationApi::NotificationApi( std::shared_ptr apiClient ) +GlobalNotificationApi::GlobalNotificationApi( std::shared_ptr apiClient ) : m_ApiClient(apiClient) { } -NotificationApi::~NotificationApi() +GlobalNotificationApi::~GlobalNotificationApi() { } -pplx::task>> NotificationApi::notification_get() +pplx::task>> GlobalNotificationApi::globalNotification_get() { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/notification"); + utility::string_t path = utility::conversions::to_string_t("/globalNotification"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -74,7 +74,7 @@ pplx::task>> NotificationApi::notifica } else { - throw ApiException(400, utility::conversions::to_string_t("NotificationApi->notification_get does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("GlobalNotificationApi->globalNotification_get does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -99,23 +99,23 @@ pplx::task>> NotificationApi::notifica } else { - throw ApiException(415, utility::conversions::to_string_t("NotificationApi->notification_get does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("GlobalNotificationApi->globalNotification_get does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -138,7 +138,7 @@ pplx::task>> NotificationApi::notifica if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling notification_get: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling globalNotification_get: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -149,7 +149,7 @@ pplx::task>> NotificationApi::notifica if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling notification_get: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling globalNotification_get: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -158,7 +158,7 @@ pplx::task>> NotificationApi::notifica }) .then([=](utility::string_t response) { - std::vector> result; + std::vector> result; if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -166,7 +166,7 @@ pplx::task>> NotificationApi::notifica for( auto& item : json.as_array() ) { - std::shared_ptr itemObj(new Notification()); + std::shared_ptr itemObj(new GlobalNotification()); itemObj->fromJson(item); result.push_back(itemObj); @@ -180,7 +180,7 @@ pplx::task>> NotificationApi::notifica else { throw ApiException(500 - , utility::conversions::to_string_t("error calling notification_get: unsupported response type")); + , utility::conversions::to_string_t("error calling globalNotification_get: unsupported response type")); } return result; diff --git a/auto-generated/cpprest/api/GlobalNotificationApi.h b/auto-generated/cpprest/api/GlobalNotificationApi.h new file mode 100644 index 000000000..9ddd00671 --- /dev/null +++ b/auto-generated/cpprest/api/GlobalNotificationApi.h @@ -0,0 +1,61 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * GlobalNotificationApi.h + * + * + */ + +#ifndef IO_SWAGGER_CLIENT_API_GlobalNotificationApi_H_ +#define IO_SWAGGER_CLIENT_API_GlobalNotificationApi_H_ + + +#include "../ApiClient.h" + +#include "Error.h" +#include "GlobalNotification.h" + +#include + +namespace io { +namespace swagger { +namespace client { +namespace api { + +using namespace io::swagger::client::model; + +class GlobalNotificationApi +{ +public: + GlobalNotificationApi( std::shared_ptr apiClient ); + virtual ~GlobalNotificationApi(); + /// + /// Get your current GlobalNotifications. + /// + /// + /// This is an upcoming feature and currently does not return data. + /// + pplx::task>> globalNotification_get( + ); + +protected: + std::shared_ptr m_ApiClient; +}; + +} +} +} +} + +#endif /* IO_SWAGGER_CLIENT_API_GlobalNotificationApi_H_ */ + diff --git a/auto-generated/cpprest/api/InstrumentApi.cpp b/auto-generated/cpprest/api/InstrumentApi.cpp index 2ebe6cf32..2d8663e97 100644 --- a/auto-generated/cpprest/api/InstrumentApi.cpp +++ b/auto-generated/cpprest/api/InstrumentApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -565,7 +565,7 @@ pplx::task> InstrumentApi::instrument_getAct return result; }); } -pplx::task>> InstrumentApi::instrument_getCompositeIndex(boost::optional account, boost::optional symbol, boost::optional filter, boost::optional columns, boost::optional count, boost::optional start, boost::optional reverse, boost::optional startTime, boost::optional endTime) +pplx::task>> InstrumentApi::instrument_getCompositeIndex(boost::optional symbol, boost::optional filter, boost::optional columns, boost::optional count, boost::optional start, boost::optional reverse, boost::optional startTime, boost::optional endTime) { @@ -612,10 +612,6 @@ pplx::task>> InstrumentApi::instrume consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - if (account) - { - queryParams[utility::conversions::to_string_t("account")] = ApiClient::parameterToString(*account); - } if (symbol) { queryParams[utility::conversions::to_string_t("symbol")] = ApiClient::parameterToString(*symbol); diff --git a/auto-generated/cpprest/api/InstrumentApi.h b/auto-generated/cpprest/api/InstrumentApi.h index 57ecaf64d..996e811e4 100644 --- a/auto-generated/cpprest/api/InstrumentApi.h +++ b/auto-generated/cpprest/api/InstrumentApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -48,7 +48,7 @@ class InstrumentApi /// /// This returns all instruments and indices, including those that have settled or are unlisted. Use this endpoint if you want to query for individual instruments or use a complex filter. Use `/instrument/active` to return active instruments, or use a filter like `{\"state\": \"Open\"}`. /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) @@ -86,7 +86,7 @@ class InstrumentApi /// Return all active contract series and interval pairs. /// /// - /// This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. + /// This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. /// pplx::task> instrument_getActiveIntervals( ); @@ -96,7 +96,6 @@ class InstrumentApi /// /// Composite indices are built from multiple external price sources. Use this endpoint to get the underlying prices of an index. For example, send a `symbol` of `.XBT` to get the ticks and weights of the constituent exchanges that build the \".XBT\" index. A tick with reference `\"BMI\"` and weight `null` is the composite index tick. /// - /// (optional) /// The composite index symbol. (optional, default to .XBT) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) @@ -106,7 +105,6 @@ class InstrumentApi /// Starting date filter for results. (optional) /// Ending date filter for results. (optional) pplx::task>> instrument_getCompositeIndex( - boost::optional account, boost::optional symbol, boost::optional filter, boost::optional columns, diff --git a/auto-generated/cpprest/api/InsuranceApi.cpp b/auto-generated/cpprest/api/InsuranceApi.cpp index 3bc194737..6924daa44 100644 --- a/auto-generated/cpprest/api/InsuranceApi.cpp +++ b/auto-generated/cpprest/api/InsuranceApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/InsuranceApi.h b/auto-generated/cpprest/api/InsuranceApi.h index cd5c53412..7bcd5e8de 100644 --- a/auto-generated/cpprest/api/InsuranceApi.h +++ b/auto-generated/cpprest/api/InsuranceApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -46,7 +46,7 @@ class InsuranceApi /// /// /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) diff --git a/auto-generated/cpprest/api/LeaderboardApi.cpp b/auto-generated/cpprest/api/LeaderboardApi.cpp index c7cb0e9ce..e0803b715 100644 --- a/auto-generated/cpprest/api/LeaderboardApi.cpp +++ b/auto-generated/cpprest/api/LeaderboardApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -166,7 +166,7 @@ pplx::task>> LeaderboardApi::leaderboar return result; }); } -pplx::task> LeaderboardApi::leaderboard_getName() +pplx::task> LeaderboardApi::leaderboard_getName() { @@ -232,20 +232,20 @@ pplx::task> LeaderboardApi::leaderboard_g throw ApiException(415, utility::conversions::to_string_t("LeaderboardApi->leaderboard_getName does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -288,7 +288,7 @@ pplx::task> LeaderboardApi::leaderboard_g }) .then([=](utility::string_t response) { - std::shared_ptr result(new Inline_response_200_1()); + std::shared_ptr result(new Inline_response_200()); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { diff --git a/auto-generated/cpprest/api/LeaderboardApi.h b/auto-generated/cpprest/api/LeaderboardApi.h index 40725eab3..10fe397fa 100644 --- a/auto-generated/cpprest/api/LeaderboardApi.h +++ b/auto-generated/cpprest/api/LeaderboardApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -23,7 +23,7 @@ #include "../ApiClient.h" #include "Error.h" -#include "Inline_response_200_1.h" +#include "Inline_response_200.h" #include "Leaderboard.h" #include @@ -57,7 +57,7 @@ class LeaderboardApi /// /// /// - pplx::task> leaderboard_getName( + pplx::task> leaderboard_getName( ); protected: diff --git a/auto-generated/cpprest/api/LiquidationApi.cpp b/auto-generated/cpprest/api/LiquidationApi.cpp index c1653d057..bc579148f 100644 --- a/auto-generated/cpprest/api/LiquidationApi.cpp +++ b/auto-generated/cpprest/api/LiquidationApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/LiquidationApi.h b/auto-generated/cpprest/api/LiquidationApi.h index 3fcc7c9ce..d53bc0241 100644 --- a/auto-generated/cpprest/api/LiquidationApi.h +++ b/auto-generated/cpprest/api/LiquidationApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -46,7 +46,7 @@ class LiquidationApi /// /// /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) diff --git a/auto-generated/cpprest/api/NotificationApi.h b/auto-generated/cpprest/api/NotificationApi.h deleted file mode 100644 index 3dd1852ab..000000000 --- a/auto-generated/cpprest/api/NotificationApi.h +++ /dev/null @@ -1,61 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -/* - * NotificationApi.h - * - * - */ - -#ifndef IO_SWAGGER_CLIENT_API_NotificationApi_H_ -#define IO_SWAGGER_CLIENT_API_NotificationApi_H_ - - -#include "../ApiClient.h" - -#include "Error.h" -#include "Notification.h" - -#include - -namespace io { -namespace swagger { -namespace client { -namespace api { - -using namespace io::swagger::client::model; - -class NotificationApi -{ -public: - NotificationApi( std::shared_ptr apiClient ); - virtual ~NotificationApi(); - /// - /// Get your current notifications. - /// - /// - /// This is an upcoming feature and currently does not return data. - /// - pplx::task>> notification_get( - ); - -protected: - std::shared_ptr m_ApiClient; -}; - -} -} -} -} - -#endif /* IO_SWAGGER_CLIENT_API_NotificationApi_H_ */ - diff --git a/auto-generated/cpprest/api/OrderApi.cpp b/auto-generated/cpprest/api/OrderApi.cpp index 2dfe66af4..e506f5230 100644 --- a/auto-generated/cpprest/api/OrderApi.cpp +++ b/auto-generated/cpprest/api/OrderApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -146,20 +146,20 @@ pplx::task> OrderApi::order_amend(boost::optionalorder_amend does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -293,20 +293,20 @@ pplx::task>> OrderApi::order_amendBulk(boost: throw ApiException(415, utility::conversions::to_string_t("OrderApi->order_amendBulk does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -455,20 +455,20 @@ pplx::task>> OrderApi::order_cancel(boost::op throw ApiException(415, utility::conversions::to_string_t("OrderApi->order_cancel does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -617,20 +617,20 @@ pplx::task>> OrderApi::order_cancelAll(boost: throw ApiException(415, utility::conversions::to_string_t("OrderApi->order_cancelAll does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -770,20 +770,20 @@ pplx::task> OrderApi::order_cancelAllAfter(double timeou throw ApiException(415, utility::conversions::to_string_t("OrderApi->order_cancelAllAfter does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -920,20 +920,20 @@ pplx::task> OrderApi::order_closePosition(utility::string throw ApiException(415, utility::conversions::to_string_t("OrderApi->order_closePosition does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1095,20 +1095,20 @@ pplx::task>> OrderApi::order_getOrders(boost: throw ApiException(415, utility::conversions::to_string_t("OrderApi->order_getOrders does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1308,20 +1308,20 @@ pplx::task> OrderApi::order_new(utility::string_t symbol, throw ApiException(415, utility::conversions::to_string_t("OrderApi->order_new does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1455,20 +1455,20 @@ pplx::task>> OrderApi::order_newBulk(boost::o throw ApiException(415, utility::conversions::to_string_t("OrderApi->order_newBulk does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required diff --git a/auto-generated/cpprest/api/OrderApi.h b/auto-generated/cpprest/api/OrderApi.h index 90d7330e5..6f1380e20 100644 --- a/auto-generated/cpprest/api/OrderApi.h +++ b/auto-generated/cpprest/api/OrderApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -45,14 +45,14 @@ class OrderApi /// Amend the quantity or price of an open order. /// /// - /// Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Use the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts. These fields will round up to the nearest contract. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. + /// Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. /// /// Order ID (optional) /// Client Order ID. See POST /order. (optional) /// Optional new Client Order ID, requires `origClOrdID`. (optional) - /// Optional order quantity in units of the underlying instrument (i.e. Bitcoin). (optional) + /// Deprecated: simple orders are not supported after 2018/10/26 (optional) /// Optional order quantity in units of the instrument (i.e. contracts). (optional) - /// Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. (optional) + /// Deprecated: simple orders are not supported after 2018/10/26 (optional) /// Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. (optional) /// Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. (optional) /// Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. (optional) @@ -137,7 +137,7 @@ class OrderApi /// /// To get open orders only, send {\"open\": true} in the filter param. See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_D_68.html\">the FIX Spec</a> for explanations of these fields. /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) @@ -159,23 +159,23 @@ class OrderApi /// Create a new order. /// /// - /// ## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: * **Limit**: The default order type. Specify an `orderQty` and `price`. * **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. * **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as permitted by available margin, will become a limit order. The difference between this type and `Market` only affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining quantity in the books as a `Limit`. * **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. * `Close` Stops don't require an `orderQty`. See Execution Instructions below. * **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. * **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. * **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). * **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. * **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill. * **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. * **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first. * **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. Please follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing. BitMEX offers four advanced Linked Order types: * **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique. Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`. * **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes. * **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended down by the execution quantity. * **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally by the fill percentage. #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities Send a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency. This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is. #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` + /// ## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: - **Limit**: The default order type. Specify an `orderQty` and `price`. - **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. - **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. - `Close` Stops don't require an `orderQty`. See Execution Instructions below. - **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. - **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. - **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). - **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. - **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. - **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first. - **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders [Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/) #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities [Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/) #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` /// /// Instrument symbol. e.g. 'XBTUSD'. - /// Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. (optional) - /// Order quantity in units of the underlying instrument (i.e. Bitcoin). (optional) + /// Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative. (optional) + /// Deprecated: simple orders are not supported after 2018/10/26 (optional) /// Order quantity in units of the instrument (i.e. contracts). (optional) /// Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. (optional) /// Optional quantity to display in the book. Use 0 for a fully hidden order. (optional) /// Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. (optional) /// Optional Client Order ID. This clOrdID will come back on the order and any related executions. (optional) - /// Optional Client Order Link ID for contingent orders. (optional) + /// Deprecated: linked orders are not supported after 2018/11/10. (optional) /// Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. (optional) /// Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. (optional) - /// Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. (optional, default to Limit) - /// Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. (optional) + /// Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. (optional, default to Limit) + /// Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. (optional) /// Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. (optional) - /// Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. (optional) + /// Deprecated: linked orders are not supported after 2018/11/10. (optional) /// Optional order annotation. e.g. 'Take profit'. (optional) pplx::task> order_new( utility::string_t symbol, @@ -199,7 +199,7 @@ class OrderApi /// Create multiple new orders for the same symbol. /// /// - /// This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. + /// This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. /// /// An array of orders. (optional) pplx::task>> order_newBulk( diff --git a/auto-generated/cpprest/api/OrderBookApi.cpp b/auto-generated/cpprest/api/OrderBookApi.cpp index bd6f05b06..21eff40db 100644 --- a/auto-generated/cpprest/api/OrderBookApi.cpp +++ b/auto-generated/cpprest/api/OrderBookApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/OrderBookApi.h b/auto-generated/cpprest/api/OrderBookApi.h index 0e72c0feb..b389d84c3 100644 --- a/auto-generated/cpprest/api/OrderBookApi.h +++ b/auto-generated/cpprest/api/OrderBookApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/PositionApi.cpp b/auto-generated/cpprest/api/PositionApi.cpp index 1bc6d0c6a..4f261a2e4 100644 --- a/auto-generated/cpprest/api/PositionApi.cpp +++ b/auto-generated/cpprest/api/PositionApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -114,20 +114,20 @@ pplx::task>> PositionApi::position_get(boo throw ApiException(415, utility::conversions::to_string_t("PositionApi->position_get does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -271,20 +271,20 @@ pplx::task> PositionApi::position_isolateMargin(utilit throw ApiException(415, utility::conversions::to_string_t("PositionApi->position_isolateMargin does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -420,20 +420,20 @@ pplx::task> PositionApi::position_transferIsolatedMarg throw ApiException(415, utility::conversions::to_string_t("PositionApi->position_transferIsolatedMargin does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -569,20 +569,20 @@ pplx::task> PositionApi::position_updateLeverage(utili throw ApiException(415, utility::conversions::to_string_t("PositionApi->position_updateLeverage does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -718,20 +718,20 @@ pplx::task> PositionApi::position_updateRiskLimit(util throw ApiException(415, utility::conversions::to_string_t("PositionApi->position_updateRiskLimit does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required diff --git a/auto-generated/cpprest/api/PositionApi.h b/auto-generated/cpprest/api/PositionApi.h index fa499e684..27d1ebe85 100644 --- a/auto-generated/cpprest/api/PositionApi.h +++ b/auto-generated/cpprest/api/PositionApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -44,7 +44,7 @@ class PositionApi /// Get your positions. /// /// - /// See <a href=\"http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html\">the FIX Spec</a> for explanations of these fields. + /// This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below. The fields _account_, _symbol_, _currency_ are unique to each position and form its key. - **account**: Your unique account ID. - **symbol**: The contract for this position. - **currency**: The margin currency for this position. - **underlying**: Meta data of the _symbol_. - **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_ - **commission**: The maximum of the maker, taker, and settlement fee. - **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage. - **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit. - **riskLimit**: This is a function of your _maintMarginReq_. - **leverage**: 1 / initMarginReq. - **crossMargin**: True/false depending on whether you set cross margin on this position. - **deleveragePercentile**: Indicates where your position is in the ADL queue. - **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position. - **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed. - **currentQty**: The current position amount in contracts. - **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_). - **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_). - **realisedCost**: The realised cost of this position calculated with regard to average cost accounting. - **unrealisedCost**: _currentCost_ - _realisedCost_. - **grossOpenCost**: The absolute value of your open orders for this symbol. - **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_). - **markPrice**: The mark price of the symbol in _quoteCurrency_. - **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_). - **homeNotional**: Value of position in units of _underlying_. - **foreignNotional**: Value of position in units of _quoteCurrency_. - **realisedPnl**: The negative of _realisedCost_. - **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_. - **unrealisedPnl**: _unrealisedGrossPnl_. - **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated. - **bankruptPrice**: Once markPrice reaches this price, this position will have no equity. /// /// Table filter. For example, send {\"symbol\": \"XBTUSD\"}. (optional) /// Which columns to fetch. For example, send [\"columnName\"]. (optional) diff --git a/auto-generated/cpprest/api/QuoteApi.cpp b/auto-generated/cpprest/api/QuoteApi.cpp index e1d2f9926..477277ab0 100644 --- a/auto-generated/cpprest/api/QuoteApi.cpp +++ b/auto-generated/cpprest/api/QuoteApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/QuoteApi.h b/auto-generated/cpprest/api/QuoteApi.h index 70a041d8d..c0960db91 100644 --- a/auto-generated/cpprest/api/QuoteApi.h +++ b/auto-generated/cpprest/api/QuoteApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -46,7 +46,7 @@ class QuoteApi /// /// /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) @@ -68,11 +68,11 @@ class QuoteApi /// Get previous quotes in time buckets. /// /// - /// + /// Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. /// /// Time interval to bucket by. Available options: [1m,5m,1h,1d]. (optional, default to 1m) /// If true, will send in-progress (incomplete) bins for the current time period. (optional, default to false) - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) diff --git a/auto-generated/cpprest/api/SchemaApi.cpp b/auto-generated/cpprest/api/SchemaApi.cpp index f07c27a21..69f69aacf 100644 --- a/auto-generated/cpprest/api/SchemaApi.cpp +++ b/auto-generated/cpprest/api/SchemaApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/SchemaApi.h b/auto-generated/cpprest/api/SchemaApi.h index 534e2ed89..ffd24574a 100644 --- a/auto-generated/cpprest/api/SchemaApi.h +++ b/auto-generated/cpprest/api/SchemaApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/SettlementApi.cpp b/auto-generated/cpprest/api/SettlementApi.cpp index fbc5c3d9a..e266bc6af 100644 --- a/auto-generated/cpprest/api/SettlementApi.cpp +++ b/auto-generated/cpprest/api/SettlementApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/SettlementApi.h b/auto-generated/cpprest/api/SettlementApi.h index 1ec40f0f1..a9c6dbd2d 100644 --- a/auto-generated/cpprest/api/SettlementApi.h +++ b/auto-generated/cpprest/api/SettlementApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -46,7 +46,7 @@ class SettlementApi /// /// /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) diff --git a/auto-generated/cpprest/api/StatsApi.cpp b/auto-generated/cpprest/api/StatsApi.cpp index aca2064b6..f91ff61a4 100644 --- a/auto-generated/cpprest/api/StatsApi.cpp +++ b/auto-generated/cpprest/api/StatsApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/StatsApi.h b/auto-generated/cpprest/api/StatsApi.h index 1ea05cda8..a74869c1a 100644 --- a/auto-generated/cpprest/api/StatsApi.h +++ b/auto-generated/cpprest/api/StatsApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/TradeApi.cpp b/auto-generated/cpprest/api/TradeApi.cpp index 41a45256a..c2ed7e0b9 100644 --- a/auto-generated/cpprest/api/TradeApi.cpp +++ b/auto-generated/cpprest/api/TradeApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/api/TradeApi.h b/auto-generated/cpprest/api/TradeApi.h index 154e175e2..b0c791cf9 100644 --- a/auto-generated/cpprest/api/TradeApi.h +++ b/auto-generated/cpprest/api/TradeApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -47,7 +47,7 @@ class TradeApi /// /// Please note that indices (symbols starting with `.`) post trades at intervals to the trade feed. These have a `size` of 0 and are used only to indicate a changing price. See [the FIX Spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AE_6569.html) for explanations of these fields. /// - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) @@ -69,11 +69,11 @@ class TradeApi /// Get previous trades in time buckets. /// /// - /// + /// Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. Also note the `open` price is equal to the `close` price of the previous timeframe bucket. /// /// Time interval to bucket by. Available options: [1m,5m,1h,1d]. (optional, default to 1m) /// If true, will send in-progress (incomplete) bins for the current time period. (optional, default to false) - /// Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + /// Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) /// Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) /// Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) /// Number of results to fetch. (optional, default to 100) diff --git a/auto-generated/cpprest/api/UserApi.cpp b/auto-generated/cpprest/api/UserApi.cpp index 858e43c48..f88c50517 100644 --- a/auto-generated/cpprest/api/UserApi.cpp +++ b/auto-generated/cpprest/api/UserApi.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -282,12 +282,12 @@ pplx::task UserApi::user_checkReferralCode(boost::optional> UserApi::user_confirm(utility::string_t token) +pplx::task>> UserApi::user_communicationToken(utility::string_t token, utility::string_t platformAgent) { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/confirmEmail"); + utility::string_t path = utility::conversions::to_string_t("/user/communicationToken"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -320,7 +320,7 @@ pplx::task> UserApi::user_confirm(utility::string_t } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_confirm does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_communicationToken does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -332,6 +332,9 @@ pplx::task> UserApi::user_confirm(utility::string_t { formParams[ utility::conversions::to_string_t("token") ] = ApiClient::parameterToString(token); } + { + formParams[ utility::conversions::to_string_t("platformAgent") ] = ApiClient::parameterToString(platformAgent); + } std::shared_ptr httpBody; utility::string_t requestHttpContentType; @@ -348,9 +351,33 @@ pplx::task> UserApi::user_confirm(utility::string_t } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_confirm does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_communicationToken does not consume any supported media type")); } + // authentication (apiExpires) required + { + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); + if ( apiKey.size() > 0 ) + { + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; + } + } + // authentication (apiKey) required + { + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + if ( apiKey.size() > 0 ) + { + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + } + } + // authentication (apiSignature) required + { + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); + if ( apiKey.size() > 0 ) + { + headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; + } + } return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) .then([=](web::http::http_response response) @@ -363,7 +390,7 @@ pplx::task> UserApi::user_confirm(utility::string_t if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_confirm: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_communicationToken: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -374,7 +401,7 @@ pplx::task> UserApi::user_confirm(utility::string_t if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_confirm: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_communicationToken: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -383,13 +410,20 @@ pplx::task> UserApi::user_confirm(utility::string_t }) .then([=](utility::string_t response) { - std::shared_ptr result(new AccessToken()); + std::vector> result; if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - result->fromJson(json); + for( auto& item : json.as_array() ) + { + std::shared_ptr itemObj(new CommunicationToken()); + itemObj->fromJson(item); + result.push_back(itemObj); + + } + } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -398,18 +432,18 @@ pplx::task> UserApi::user_confirm(utility::string_t else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_confirm: unsupported response type")); + , utility::conversions::to_string_t("error calling user_communicationToken: unsupported response type")); } return result; }); } -pplx::task UserApi::user_confirmEnableTFA(utility::string_t token, boost::optional type) +pplx::task> UserApi::user_confirm(utility::string_t token) { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/confirmEnableTFA"); + utility::string_t path = utility::conversions::to_string_t("/user/confirmEmail"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -442,7 +476,7 @@ pplx::task UserApi::user_confirmEnableTFA(utility::string_t token, boost:: } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_confirmEnableTFA does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_confirm does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -454,10 +488,6 @@ pplx::task UserApi::user_confirmEnableTFA(utility::string_t token, boost:: { formParams[ utility::conversions::to_string_t("token") ] = ApiClient::parameterToString(token); } - if (type) - { - formParams[ utility::conversions::to_string_t("type") ] = ApiClient::parameterToString(*type); - } std::shared_ptr httpBody; utility::string_t requestHttpContentType; @@ -474,33 +504,9 @@ pplx::task UserApi::user_confirmEnableTFA(utility::string_t token, boost:: } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_confirmEnableTFA does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_confirm does not consume any supported media type")); } - // authentication (apiKey) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; - } - } - // authentication (apiNonce) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; - } - } - // authentication (apiSignature) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; - } - } return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) .then([=](web::http::http_response response) @@ -513,7 +519,7 @@ pplx::task UserApi::user_confirmEnableTFA(utility::string_t token, boost:: if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_confirmEnableTFA: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_confirm: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -524,7 +530,7 @@ pplx::task UserApi::user_confirmEnableTFA(utility::string_t token, boost:: if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_confirmEnableTFA: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_confirm: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -533,14 +539,13 @@ pplx::task UserApi::user_confirmEnableTFA(utility::string_t token, boost:: }) .then([=](utility::string_t response) { - bool result(false); + std::shared_ptr result(new AccessToken()); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - result = ModelBase::boolFromJson(json); - + result->fromJson(json); } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -549,7 +554,7 @@ pplx::task UserApi::user_confirmEnableTFA(utility::string_t token, boost:: else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_confirmEnableTFA: unsupported response type")); + , utility::conversions::to_string_t("error calling user_confirm: unsupported response type")); } return result; @@ -677,12 +682,12 @@ pplx::task> UserApi::user_confirmWithdrawal(utility return result; }); } -pplx::task UserApi::user_disableTFA(utility::string_t token, boost::optional type) +pplx::task> UserApi::user_get() { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/disableTFA"); + utility::string_t path = utility::conversions::to_string_t("/user"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -715,7 +720,7 @@ pplx::task UserApi::user_disableTFA(utility::string_t token, boost::option } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_disableTFA does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_get does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -724,13 +729,6 @@ pplx::task UserApi::user_disableTFA(utility::string_t token, boost::option consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - { - formParams[ utility::conversions::to_string_t("token") ] = ApiClient::parameterToString(token); - } - if (type) - { - formParams[ utility::conversions::to_string_t("type") ] = ApiClient::parameterToString(*type); - } std::shared_ptr httpBody; utility::string_t requestHttpContentType; @@ -747,23 +745,23 @@ pplx::task UserApi::user_disableTFA(utility::string_t token, boost::option } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_disableTFA does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_get does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -775,7 +773,7 @@ pplx::task UserApi::user_disableTFA(utility::string_t token, boost::option } } - return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) + return m_ApiClient->callApi(path, utility::conversions::to_string_t("GET"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) .then([=](web::http::http_response response) { // 1xx - informational : OK @@ -786,7 +784,7 @@ pplx::task UserApi::user_disableTFA(utility::string_t token, boost::option if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_disableTFA: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_get: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -797,7 +795,7 @@ pplx::task UserApi::user_disableTFA(utility::string_t token, boost::option if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_disableTFA: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_get: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -806,14 +804,13 @@ pplx::task UserApi::user_disableTFA(utility::string_t token, boost::option }) .then([=](utility::string_t response) { - bool result(false); + std::shared_ptr result(new User()); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - result = ModelBase::boolFromJson(json); - + result->fromJson(json); } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -822,18 +819,18 @@ pplx::task UserApi::user_disableTFA(utility::string_t token, boost::option else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_disableTFA: unsupported response type")); + , utility::conversions::to_string_t("error calling user_get: unsupported response type")); } return result; }); } -pplx::task> UserApi::user_get() +pplx::task> UserApi::user_getAffiliateStatus() { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user"); + utility::string_t path = utility::conversions::to_string_t("/user/affiliateStatus"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -866,7 +863,7 @@ pplx::task> UserApi::user_get() } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_get does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getAffiliateStatus does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -891,23 +888,23 @@ pplx::task> UserApi::user_get() } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_get does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getAffiliateStatus does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -930,7 +927,7 @@ pplx::task> UserApi::user_get() if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_get: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_getAffiliateStatus: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -941,7 +938,7 @@ pplx::task> UserApi::user_get() if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_get: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_getAffiliateStatus: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -950,7 +947,7 @@ pplx::task> UserApi::user_get() }) .then([=](utility::string_t response) { - std::shared_ptr result(new User()); + std::shared_ptr result(new Affiliate()); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -965,18 +962,18 @@ pplx::task> UserApi::user_get() else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_get: unsupported response type")); + , utility::conversions::to_string_t("error calling user_getAffiliateStatus: unsupported response type")); } return result; }); } -pplx::task> UserApi::user_getAffiliateStatus() +pplx::task> UserApi::user_getCommission() { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/affiliateStatus"); + utility::string_t path = utility::conversions::to_string_t("/user/commission"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -1009,7 +1006,7 @@ pplx::task> UserApi::user_getAffiliateStatus() } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getAffiliateStatus does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getCommission does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -1034,23 +1031,23 @@ pplx::task> UserApi::user_getAffiliateStatus() } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getAffiliateStatus does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getCommission does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1073,7 +1070,7 @@ pplx::task> UserApi::user_getAffiliateStatus() if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_getAffiliateStatus: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_getCommission: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -1084,7 +1081,7 @@ pplx::task> UserApi::user_getAffiliateStatus() if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_getAffiliateStatus: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_getCommission: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -1093,7 +1090,7 @@ pplx::task> UserApi::user_getAffiliateStatus() }) .then([=](utility::string_t response) { - std::shared_ptr result(new Affiliate()); + std::shared_ptr result(new UserCommissionsBySymbol()); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -1108,18 +1105,18 @@ pplx::task> UserApi::user_getAffiliateStatus() else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_getAffiliateStatus: unsupported response type")); + , utility::conversions::to_string_t("error calling user_getCommission: unsupported response type")); } return result; }); } -pplx::task>> UserApi::user_getCommission() +pplx::task UserApi::user_getDepositAddress(boost::optional currency) { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/commission"); + utility::string_t path = utility::conversions::to_string_t("/user/depositAddress"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -1138,7 +1135,7 @@ pplx::task>> UserApi::user_getCommis // use JSON if possible if ( responseHttpContentTypes.size() == 0 ) { - responseHttpContentType = utility::conversions::to_string_t("application/json"); + responseHttpContentType = utility::conversions::to_string_t("text/plain"); } // JSON else if ( responseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != responseHttpContentTypes.end() ) @@ -1150,9 +1147,14 @@ pplx::task>> UserApi::user_getCommis { responseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); } + // plain text + else if( responseHttpContentTypes.find(utility::conversions::to_string_t("text/plain")) != responseHttpContentTypes.end() ) + { + responseHttpContentType = utility::conversions::to_string_t("text/plain"); + } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getCommission does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getDepositAddress does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -1161,6 +1163,10 @@ pplx::task>> UserApi::user_getCommis consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); + if (currency) + { + queryParams[utility::conversions::to_string_t("currency")] = ApiClient::parameterToString(*currency); + } std::shared_ptr httpBody; utility::string_t requestHttpContentType; @@ -1177,23 +1183,23 @@ pplx::task>> UserApi::user_getCommis } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getCommission does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getDepositAddress does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1216,7 +1222,7 @@ pplx::task>> UserApi::user_getCommis if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_getCommission: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_getDepositAddress: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -1227,7 +1233,7 @@ pplx::task>> UserApi::user_getCommis if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_getCommission: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_getDepositAddress: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -1236,21 +1242,19 @@ pplx::task>> UserApi::user_getCommis }) .then([=](utility::string_t response) { - std::vector> result; + utility::string_t result(utility::conversions::to_string_t("")); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - for( auto& item : json.as_array() ) - { - std::shared_ptr itemObj(new UserCommission()); - itemObj->fromJson(item); - result.push_back(itemObj); - - } + result = ModelBase::stringFromJson(json); } + else if(responseHttpContentType == utility::conversions::to_string_t("text/plain")) + { + result = response; + } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { // TODO multipart response parsing @@ -1258,18 +1262,18 @@ pplx::task>> UserApi::user_getCommis else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_getCommission: unsupported response type")); + , utility::conversions::to_string_t("error calling user_getDepositAddress: unsupported response type")); } return result; }); } -pplx::task UserApi::user_getDepositAddress(boost::optional currency) +pplx::task> UserApi::user_getExecutionHistory(utility::string_t symbol, utility::datetime timestamp) { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/depositAddress"); + utility::string_t path = utility::conversions::to_string_t("/user/executionHistory"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -1288,7 +1292,7 @@ pplx::task UserApi::user_getDepositAddress(boost::optional UserApi::user_getDepositAddress(boost::optionaluser_getDepositAddress does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getExecutionHistory does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -1316,9 +1315,11 @@ pplx::task UserApi::user_getDepositAddress(boost::optional httpBody; @@ -1336,23 +1337,23 @@ pplx::task UserApi::user_getDepositAddress(boost::optionaluser_getDepositAddress does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getExecutionHistory does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1375,7 +1376,7 @@ pplx::task UserApi::user_getDepositAddress(boost::optional= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_getDepositAddress: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_getExecutionHistory: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -1386,7 +1387,7 @@ pplx::task UserApi::user_getDepositAddress(boost::optional(response.extract_utf8string(true).get())); } } @@ -1395,18 +1396,13 @@ pplx::task UserApi::user_getDepositAddress(boost::optional result(nullptr); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - result = ModelBase::stringFromJson(json); - - } - else if(responseHttpContentType == utility::conversions::to_string_t("text/plain")) - { - result = response; + result->fromJson(json); } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -1415,7 +1411,7 @@ pplx::task UserApi::user_getDepositAddress(boost::optional> UserApi::user_getMargin(boost::optionaluser_getMargin does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1568,12 +1564,12 @@ pplx::task> UserApi::user_getMargin(boost::optional> UserApi::user_getWallet(boost::optional currency) +pplx::task> UserApi::user_getQuoteFillRatio() { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/wallet"); + utility::string_t path = utility::conversions::to_string_t("/user/quoteFillRatio"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -1606,7 +1602,7 @@ pplx::task> UserApi::user_getWallet(boost::optionaluser_getWallet does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getQuoteFillRatio does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -1615,10 +1611,6 @@ pplx::task> UserApi::user_getWallet(boost::optional httpBody; utility::string_t requestHttpContentType; @@ -1635,23 +1627,23 @@ pplx::task> UserApi::user_getWallet(boost::optionaluser_getWallet does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getQuoteFillRatio does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1674,7 +1666,7 @@ pplx::task> UserApi::user_getWallet(boost::optional= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_getWallet: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_getQuoteFillRatio: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -1685,7 +1677,7 @@ pplx::task> UserApi::user_getWallet(boost::optional(response.extract_utf8string(true).get())); } } @@ -1694,7 +1686,7 @@ pplx::task> UserApi::user_getWallet(boost::optional result(new Wallet()); + std::shared_ptr result(new QuoteFillRatio()); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -1709,18 +1701,18 @@ pplx::task> UserApi::user_getWallet(boost::optional>> UserApi::user_getWalletHistory(boost::optional currency) +pplx::task> UserApi::user_getWallet(boost::optional currency) { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/walletHistory"); + utility::string_t path = utility::conversions::to_string_t("/user/wallet"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -1753,7 +1745,7 @@ pplx::task>> UserApi::user_getWalletHis } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getWalletHistory does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getWallet does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -1782,23 +1774,23 @@ pplx::task>> UserApi::user_getWalletHis } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getWalletHistory does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getWallet does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1821,7 +1813,7 @@ pplx::task>> UserApi::user_getWalletHis if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_getWalletHistory: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_getWallet: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -1832,7 +1824,7 @@ pplx::task>> UserApi::user_getWalletHis if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_getWalletHistory: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_getWallet: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -1841,20 +1833,13 @@ pplx::task>> UserApi::user_getWalletHis }) .then([=](utility::string_t response) { - std::vector> result; + std::shared_ptr result(new Wallet()); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - for( auto& item : json.as_array() ) - { - std::shared_ptr itemObj(new Transaction()); - itemObj->fromJson(item); - result.push_back(itemObj); - - } - + result->fromJson(json); } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -1863,18 +1848,18 @@ pplx::task>> UserApi::user_getWalletHis else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_getWalletHistory: unsupported response type")); + , utility::conversions::to_string_t("error calling user_getWallet: unsupported response type")); } return result; }); } -pplx::task>> UserApi::user_getWalletSummary(boost::optional currency) +pplx::task>> UserApi::user_getWalletHistory(boost::optional currency, boost::optional count, boost::optional start) { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/walletSummary"); + utility::string_t path = utility::conversions::to_string_t("/user/walletHistory"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -1907,7 +1892,7 @@ pplx::task>> UserApi::user_getWalletSum } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getWalletSummary does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getWalletHistory does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -1920,6 +1905,14 @@ pplx::task>> UserApi::user_getWalletSum { queryParams[utility::conversions::to_string_t("currency")] = ApiClient::parameterToString(*currency); } + if (count) + { + queryParams[utility::conversions::to_string_t("count")] = ApiClient::parameterToString(*count); + } + if (start) + { + queryParams[utility::conversions::to_string_t("start")] = ApiClient::parameterToString(*start); + } std::shared_ptr httpBody; utility::string_t requestHttpContentType; @@ -1936,23 +1929,23 @@ pplx::task>> UserApi::user_getWalletSum } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getWalletSummary does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getWalletHistory does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -1975,7 +1968,7 @@ pplx::task>> UserApi::user_getWalletSum if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_getWalletSummary: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_getWalletHistory: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -1986,7 +1979,7 @@ pplx::task>> UserApi::user_getWalletSum if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_getWalletSummary: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_getWalletHistory: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -2017,18 +2010,18 @@ pplx::task>> UserApi::user_getWalletSum else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_getWalletSummary: unsupported response type")); + , utility::conversions::to_string_t("error calling user_getWalletHistory: unsupported response type")); } return result; }); } -pplx::task UserApi::user_logout() +pplx::task>> UserApi::user_getWalletSummary(boost::optional currency) { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/logout"); + utility::string_t path = utility::conversions::to_string_t("/user/walletSummary"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -2061,7 +2054,7 @@ pplx::task UserApi::user_logout() } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_logout does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_getWalletSummary does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -2070,108 +2063,11 @@ pplx::task UserApi::user_logout() consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - std::shared_ptr httpBody; - utility::string_t requestHttpContentType; - - // use JSON if possible - if ( consumeHttpContentTypes.size() == 0 || consumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( consumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_logout does not consume any supported media type")); - } - - - return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) - .then([=](web::http::http_response response) - { - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (response.status_code() >= 400) - { - throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_logout: ") + response.reason_phrase() - , std::make_shared(response.extract_utf8string(true).get())); - } - - // check response content type - if(response.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t contentType = response.headers()[utility::conversions::to_string_t("Content-Type")]; - if( contentType.find(responseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling user_logout: unexpected response type: ") + contentType - , std::make_shared(response.extract_utf8string(true).get())); - } - } - - return response.extract_string(); - }) - .then([=](utility::string_t response) - { - return void(); - }); -} -pplx::task UserApi::user_logoutAll() -{ - - - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/logoutAll"); - - std::map queryParams; - std::map headerParams( apiConfiguration->getDefaultHeaders() ); - std::map formParams; - std::map> fileParams; - - std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/javascript") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/javascript") ); - - utility::string_t responseHttpContentType; - - // use JSON if possible - if ( responseHttpContentTypes.size() == 0 ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( responseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( responseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else + if (currency) { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_logoutAll does not produce any supported media type")); + queryParams[utility::conversions::to_string_t("currency")] = ApiClient::parameterToString(*currency); } - headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; - - std::unordered_set consumeHttpContentTypes; - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - std::shared_ptr httpBody; utility::string_t requestHttpContentType; @@ -2187,23 +2083,23 @@ pplx::task UserApi::user_logoutAll() } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_logoutAll does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_getWalletSummary does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -2215,7 +2111,7 @@ pplx::task UserApi::user_logoutAll() } } - return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) + return m_ApiClient->callApi(path, utility::conversions::to_string_t("GET"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) .then([=](web::http::http_response response) { // 1xx - informational : OK @@ -2226,7 +2122,7 @@ pplx::task UserApi::user_logoutAll() if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_logoutAll: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_getWalletSummary: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -2237,7 +2133,7 @@ pplx::task UserApi::user_logoutAll() if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_logoutAll: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_getWalletSummary: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -2246,13 +2142,19 @@ pplx::task UserApi::user_logoutAll() }) .then([=](utility::string_t response) { - double result(0.0); + std::vector> result; if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - result = ModelBase::doubleFromJson(json); + for( auto& item : json.as_array() ) + { + std::shared_ptr itemObj(new Transaction()); + itemObj->fromJson(item); + result.push_back(itemObj); + + } } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) @@ -2262,18 +2164,18 @@ pplx::task UserApi::user_logoutAll() else { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_logoutAll: unsupported response type")); + , utility::conversions::to_string_t("error calling user_getWalletSummary: unsupported response type")); } return result; }); } -pplx::task> UserApi::user_minWithdrawalFee(boost::optional currency) +pplx::task UserApi::user_logout() { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/minWithdrawalFee"); + utility::string_t path = utility::conversions::to_string_t("/user/logout"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -2306,7 +2208,7 @@ pplx::task> UserApi::user_minWithdrawalFee(boost::option } else { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_minWithdrawalFee does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_logout does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -2315,10 +2217,6 @@ pplx::task> UserApi::user_minWithdrawalFee(boost::option consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - if (currency) - { - queryParams[utility::conversions::to_string_t("currency")] = ApiClient::parameterToString(*currency); - } std::shared_ptr httpBody; utility::string_t requestHttpContentType; @@ -2335,11 +2233,11 @@ pplx::task> UserApi::user_minWithdrawalFee(boost::option } else { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_minWithdrawalFee does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_logout does not consume any supported media type")); } - return m_ApiClient->callApi(path, utility::conversions::to_string_t("GET"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) + return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) .then([=](web::http::http_response response) { // 1xx - informational : OK @@ -2350,7 +2248,7 @@ pplx::task> UserApi::user_minWithdrawalFee(boost::option if (response.status_code() >= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_minWithdrawalFee: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_logout: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -2361,7 +2259,7 @@ pplx::task> UserApi::user_minWithdrawalFee(boost::option if( contentType.find(responseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling user_minWithdrawalFee: unexpected response type: ") + contentType + , utility::conversions::to_string_t("error calling user_logout: unexpected response type: ") + contentType , std::make_shared(response.extract_utf8string(true).get())); } } @@ -2370,33 +2268,15 @@ pplx::task> UserApi::user_minWithdrawalFee(boost::option }) .then([=](utility::string_t response) { - std::shared_ptr result(nullptr); - - if(responseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value json = web::json::value::parse(response); - - result->fromJson(json); - } - // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling user_minWithdrawalFee: unsupported response type")); - } - - return result; + return void(); }); } -pplx::task UserApi::user_requestEnableTFA(boost::optional type) +pplx::task> UserApi::user_minWithdrawalFee(boost::optional currency) { std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user/requestEnableTFA"); + utility::string_t path = utility::conversions::to_string_t("/user/minWithdrawalFee"); std::map queryParams; std::map headerParams( apiConfiguration->getDefaultHeaders() ); @@ -2429,7 +2309,7 @@ pplx::task UserApi::user_requestEnableTFA(boost::optionaluser_requestEnableTFA does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("UserApi->user_minWithdrawalFee does not produce any supported media type")); } headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; @@ -2438,9 +2318,9 @@ pplx::task UserApi::user_requestEnableTFA(boost::optional httpBody; @@ -2458,35 +2338,11 @@ pplx::task UserApi::user_requestEnableTFA(boost::optionaluser_requestEnableTFA does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("UserApi->user_minWithdrawalFee does not consume any supported media type")); } - // authentication (apiKey) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; - } - } - // authentication (apiNonce) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; - } - } - // authentication (apiSignature) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; - } - } - return m_ApiClient->callApi(path, utility::conversions::to_string_t("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) + return m_ApiClient->callApi(path, utility::conversions::to_string_t("GET"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) .then([=](web::http::http_response response) { // 1xx - informational : OK @@ -2497,7 +2353,7 @@ pplx::task UserApi::user_requestEnableTFA(boost::optional= 400) { throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_requestEnableTFA: ") + response.reason_phrase() + , utility::conversions::to_string_t("error calling user_minWithdrawalFee: ") + response.reason_phrase() , std::make_shared(response.extract_utf8string(true).get())); } @@ -2508,7 +2364,7 @@ pplx::task UserApi::user_requestEnableTFA(boost::optional(response.extract_utf8string(true).get())); } } @@ -2517,14 +2373,13 @@ pplx::task UserApi::user_requestEnableTFA(boost::optional result(nullptr); if(responseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value json = web::json::value::parse(response); - result = ModelBase::boolFromJson(json); - + result->fromJson(json); } // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -2533,13 +2388,13 @@ pplx::task UserApi::user_requestEnableTFA(boost::optional> UserApi::user_requestWithdrawal(utility::string_t currency, double amount, utility::string_t address, boost::optional otpToken, boost::optional fee) +pplx::task> UserApi::user_requestWithdrawal(utility::string_t currency, double amount, utility::string_t address, boost::optional otpToken, boost::optional fee, boost::optional text) { @@ -2603,6 +2458,10 @@ pplx::task> UserApi::user_requestWithdrawal(utility { formParams[ utility::conversions::to_string_t("fee") ] = ApiClient::parameterToString(*fee); } + if (text) + { + formParams[ utility::conversions::to_string_t("text") ] = ApiClient::parameterToString(*text); + } std::shared_ptr httpBody; utility::string_t requestHttpContentType; @@ -2622,20 +2481,20 @@ pplx::task> UserApi::user_requestWithdrawal(utility throw ApiException(415, utility::conversions::to_string_t("UserApi->user_requestWithdrawal does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -2772,20 +2631,20 @@ pplx::task> UserApi::user_savePreferences(utility::string_ throw ApiException(415, utility::conversions::to_string_t("UserApi->user_savePreferences does not consume any supported media type")); } - // authentication (apiKey) required + // authentication (apiExpires) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; } } - // authentication (apiNonce) required + // authentication (apiKey) required { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); if ( apiKey.size() > 0 ) { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; } } // authentication (apiSignature) required @@ -2849,181 +2708,6 @@ pplx::task> UserApi::user_savePreferences(utility::string_ return result; }); } -pplx::task> UserApi::user_update(boost::optional firstname, boost::optional lastname, boost::optional oldPassword, boost::optional newPassword, boost::optional newPasswordConfirm, boost::optional username, boost::optional country, boost::optional pgpPubKey) -{ - - - std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t path = utility::conversions::to_string_t("/user"); - - std::map queryParams; - std::map headerParams( apiConfiguration->getDefaultHeaders() ); - std::map formParams; - std::map> fileParams; - - std::unordered_set responseHttpContentTypes; - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/xml") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("application/javascript") ); - responseHttpContentTypes.insert( utility::conversions::to_string_t("text/javascript") ); - - utility::string_t responseHttpContentType; - - // use JSON if possible - if ( responseHttpContentTypes.size() == 0 ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( responseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( responseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != responseHttpContentTypes.end() ) - { - responseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("UserApi->user_update does not produce any supported media type")); - } - - headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; - - std::unordered_set consumeHttpContentTypes; - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); - - if (firstname) - { - formParams[ utility::conversions::to_string_t("firstname") ] = ApiClient::parameterToString(*firstname); - } - if (lastname) - { - formParams[ utility::conversions::to_string_t("lastname") ] = ApiClient::parameterToString(*lastname); - } - if (oldPassword) - { - formParams[ utility::conversions::to_string_t("oldPassword") ] = ApiClient::parameterToString(*oldPassword); - } - if (newPassword) - { - formParams[ utility::conversions::to_string_t("newPassword") ] = ApiClient::parameterToString(*newPassword); - } - if (newPasswordConfirm) - { - formParams[ utility::conversions::to_string_t("newPasswordConfirm") ] = ApiClient::parameterToString(*newPasswordConfirm); - } - if (username) - { - formParams[ utility::conversions::to_string_t("username") ] = ApiClient::parameterToString(*username); - } - if (country) - { - formParams[ utility::conversions::to_string_t("country") ] = ApiClient::parameterToString(*country); - } - if (pgpPubKey) - { - formParams[ utility::conversions::to_string_t("pgpPubKey") ] = ApiClient::parameterToString(*pgpPubKey); - } - - std::shared_ptr httpBody; - utility::string_t requestHttpContentType; - - // use JSON if possible - if ( consumeHttpContentTypes.size() == 0 || consumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( consumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != consumeHttpContentTypes.end() ) - { - requestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("UserApi->user_update does not consume any supported media type")); - } - - // authentication (apiKey) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-key")] = apiKey; - } - } - // authentication (apiNonce) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-nonce")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-nonce")] = apiKey; - } - } - // authentication (apiSignature) required - { - utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); - if ( apiKey.size() > 0 ) - { - headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; - } - } - - return m_ApiClient->callApi(path, utility::conversions::to_string_t("PUT"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) - .then([=](web::http::http_response response) - { - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (response.status_code() >= 400) - { - throw ApiException(response.status_code() - , utility::conversions::to_string_t("error calling user_update: ") + response.reason_phrase() - , std::make_shared(response.extract_utf8string(true).get())); - } - - // check response content type - if(response.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t contentType = response.headers()[utility::conversions::to_string_t("Content-Type")]; - if( contentType.find(responseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling user_update: unexpected response type: ") + contentType - , std::make_shared(response.extract_utf8string(true).get())); - } - } - - return response.extract_string(); - }) - .then([=](utility::string_t response) - { - std::shared_ptr result(new User()); - - if(responseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value json = web::json::value::parse(response); - - result->fromJson(json); - } - // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling user_update: unsupported response type")); - } - - return result; - }); -} } } diff --git a/auto-generated/cpprest/api/UserApi.h b/auto-generated/cpprest/api/UserApi.h index 03a3eb1f0..a377869d3 100644 --- a/auto-generated/cpprest/api/UserApi.h +++ b/auto-generated/cpprest/api/UserApi.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -24,11 +24,14 @@ #include "AccessToken.h" #include "Affiliate.h" +#include "CommunicationToken.h" +#include "Error.h" #include "Margin.h" #include "Object.h" +#include "QuoteFillRatio.h" #include "Transaction.h" #include "User.h" -#include "UserCommission.h" +#include "UserCommissionsBySymbol.h" #include "Wallet.h" #include @@ -60,33 +63,33 @@ class UserApi /// Check if a referral code is valid. /// /// - /// If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404. + /// If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid. /// /// (optional) pplx::task user_checkReferralCode( boost::optional referralCode ); /// - /// Confirm your email address with a token. + /// Register your communication token for mobile clients /// /// /// /// /// - pplx::task> user_confirm( - utility::string_t token + /// + pplx::task>> user_communicationToken( + utility::string_t token, + utility::string_t platformAgent ); /// - /// Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. + /// Confirm your email address with a token. /// /// /// /// - /// Token from your selected TFA type. - /// Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' (optional) - pplx::task user_confirmEnableTFA( - utility::string_t token, - boost::optional type + /// + pplx::task> user_confirm( + utility::string_t token ); /// /// Confirm a withdrawal. @@ -99,18 +102,6 @@ class UserApi utility::string_t token ); /// - /// Disable two-factor auth for this account. - /// - /// - /// - /// - /// Token from your selected TFA type. - /// Two-factor auth type. Supported types: 'GA' (Google Authenticator) (optional) - pplx::task user_disableTFA( - utility::string_t token, - boost::optional type - ); - /// /// Get your user model. /// /// @@ -132,7 +123,7 @@ class UserApi /// /// /// - pplx::task>> user_getCommission( + pplx::task> user_getCommission( ); /// /// Get a deposit address. @@ -145,6 +136,18 @@ class UserApi boost::optional currency ); /// + /// Get the execution history by day. + /// + /// + /// + /// + /// + /// + pplx::task> user_getExecutionHistory( + utility::string_t symbol, + utility::datetime timestamp + ); + /// /// Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. /// /// @@ -155,6 +158,14 @@ class UserApi boost::optional currency ); /// + /// Get 7 days worth of Quote Fill Ratio statistics. + /// + /// + /// + /// + pplx::task> user_getQuoteFillRatio( + ); + /// /// Get your current wallet information. /// /// @@ -171,8 +182,12 @@ class UserApi /// /// /// (optional, default to XBt) + /// Number of results to fetch. (optional, default to 100) + /// Starting point for results. (optional, default to 0) pplx::task>> user_getWalletHistory( - boost::optional currency + boost::optional currency, + boost::optional count, + boost::optional start ); /// /// Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). @@ -193,14 +208,6 @@ class UserApi pplx::task user_logout( ); /// - /// Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. - /// - /// - /// - /// - pplx::task user_logoutAll( - ); - /// /// Get the minimum withdrawal fee for a currency. /// /// @@ -211,32 +218,24 @@ class UserApi boost::optional currency ); /// - /// Get secret key for setting up two-factor auth. - /// - /// - /// Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled. - /// - /// Two-factor auth type. Supported types: 'GA' (Google Authenticator) (optional) - pplx::task user_requestEnableTFA( - boost::optional type - ); - /// /// Request a withdrawal to an external wallet. /// /// - /// This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission. + /// This will send a confirmation email to the email address on record. /// /// Currency you're withdrawing. Options: `XBt` /// Amount of withdrawal currency. /// Destination Address. /// 2FA token. Required if 2FA is enabled on your account. (optional) /// Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. (optional) + /// Optional annotation, e.g. 'Transfer to home wallet'. (optional) pplx::task> user_requestWithdrawal( utility::string_t currency, double amount, utility::string_t address, boost::optional otpToken, - boost::optional fee + boost::optional fee, + boost::optional text ); /// /// Save user preferences. @@ -250,30 +249,6 @@ class UserApi utility::string_t prefs, boost::optional overwrite ); - /// - /// Update your password, name, and other attributes. - /// - /// - /// - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Username can only be set once. To reset, email support. (optional) - /// Country of residence. (optional) - /// PGP Public Key. If specified, automated emails will be sentwith this key. (optional) - pplx::task> user_update( - boost::optional firstname, - boost::optional lastname, - boost::optional oldPassword, - boost::optional newPassword, - boost::optional newPasswordConfirm, - boost::optional username, - boost::optional country, - boost::optional pgpPubKey - ); protected: std::shared_ptr m_ApiClient; diff --git a/auto-generated/cpprest/api/UserEventApi.cpp b/auto-generated/cpprest/api/UserEventApi.cpp new file mode 100644 index 000000000..cd056a607 --- /dev/null +++ b/auto-generated/cpprest/api/UserEventApi.cpp @@ -0,0 +1,202 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "UserEventApi.h" +#include "IHttpBody.h" +#include "JsonBody.h" +#include "MultipartFormData.h" + +#include + +#include + +namespace io { +namespace swagger { +namespace client { +namespace api { + +using namespace io::swagger::client::model; + +UserEventApi::UserEventApi( std::shared_ptr apiClient ) + : m_ApiClient(apiClient) +{ +} + +UserEventApi::~UserEventApi() +{ +} + +pplx::task>> UserEventApi::userEvent_get(boost::optional count, boost::optional startId) +{ + + + std::shared_ptr apiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t path = utility::conversions::to_string_t("/userEvent"); + + std::map queryParams; + std::map headerParams( apiConfiguration->getDefaultHeaders() ); + std::map formParams; + std::map> fileParams; + + std::unordered_set responseHttpContentTypes; + responseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + responseHttpContentTypes.insert( utility::conversions::to_string_t("application/xml") ); + responseHttpContentTypes.insert( utility::conversions::to_string_t("text/xml") ); + responseHttpContentTypes.insert( utility::conversions::to_string_t("application/javascript") ); + responseHttpContentTypes.insert( utility::conversions::to_string_t("text/javascript") ); + + utility::string_t responseHttpContentType; + + // use JSON if possible + if ( responseHttpContentTypes.size() == 0 ) + { + responseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( responseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != responseHttpContentTypes.end() ) + { + responseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( responseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != responseHttpContentTypes.end() ) + { + responseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("UserEventApi->userEvent_get does not produce any supported media type")); + } + + headerParams[utility::conversions::to_string_t("Accept")] = responseHttpContentType; + + std::unordered_set consumeHttpContentTypes; + consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + consumeHttpContentTypes.insert( utility::conversions::to_string_t("application/x-www-form-urlencoded") ); + + if (count) + { + queryParams[utility::conversions::to_string_t("count")] = ApiClient::parameterToString(*count); + } + if (startId) + { + queryParams[utility::conversions::to_string_t("startId")] = ApiClient::parameterToString(*startId); + } + + std::shared_ptr httpBody; + utility::string_t requestHttpContentType; + + // use JSON if possible + if ( consumeHttpContentTypes.size() == 0 || consumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != consumeHttpContentTypes.end() ) + { + requestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( consumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != consumeHttpContentTypes.end() ) + { + requestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("UserEventApi->userEvent_get does not consume any supported media type")); + } + + // authentication (apiExpires) required + { + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-expires")); + if ( apiKey.size() > 0 ) + { + headerParams[utility::conversions::to_string_t("api-expires")] = apiKey; + } + } + // authentication (apiKey) required + { + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-key")); + if ( apiKey.size() > 0 ) + { + headerParams[utility::conversions::to_string_t("api-key")] = apiKey; + } + } + // authentication (apiSignature) required + { + utility::string_t apiKey = apiConfiguration->getApiKey(utility::conversions::to_string_t("api-signature")); + if ( apiKey.size() > 0 ) + { + headerParams[utility::conversions::to_string_t("api-signature")] = apiKey; + } + } + + return m_ApiClient->callApi(path, utility::conversions::to_string_t("GET"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType) + .then([=](web::http::http_response response) + { + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (response.status_code() >= 400) + { + throw ApiException(response.status_code() + , utility::conversions::to_string_t("error calling userEvent_get: ") + response.reason_phrase() + , std::make_shared(response.extract_utf8string(true).get())); + } + + // check response content type + if(response.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t contentType = response.headers()[utility::conversions::to_string_t("Content-Type")]; + if( contentType.find(responseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling userEvent_get: unexpected response type: ") + contentType + , std::make_shared(response.extract_utf8string(true).get())); + } + } + + return response.extract_string(); + }) + .then([=](utility::string_t response) + { + std::vector> result; + + if(responseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value json = web::json::value::parse(response); + + for( auto& item : json.as_array() ) + { + std::shared_ptr itemObj(new UserEvent()); + itemObj->fromJson(item); + result.push_back(itemObj); + + } + + } + // else if(responseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling userEvent_get: unsupported response type")); + } + + return result; + }); +} + +} +} +} +} + diff --git a/auto-generated/cpprest/api/UserEventApi.h b/auto-generated/cpprest/api/UserEventApi.h new file mode 100644 index 000000000..c82126951 --- /dev/null +++ b/auto-generated/cpprest/api/UserEventApi.h @@ -0,0 +1,65 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * UserEventApi.h + * + * + */ + +#ifndef IO_SWAGGER_CLIENT_API_UserEventApi_H_ +#define IO_SWAGGER_CLIENT_API_UserEventApi_H_ + + +#include "../ApiClient.h" + +#include "Error.h" +#include "UserEvent.h" + +#include + +namespace io { +namespace swagger { +namespace client { +namespace api { + +using namespace io::swagger::client::model; + +class UserEventApi +{ +public: + UserEventApi( std::shared_ptr apiClient ); + virtual ~UserEventApi(); + /// + /// Get your user events + /// + /// + /// + /// + /// Number of results to fetch. (optional, default to 150) + /// Cursor for pagination. (optional) + pplx::task>> userEvent_get( + boost::optional count, + boost::optional startId + ); + +protected: + std::shared_ptr m_ApiClient; +}; + +} +} +} +} + +#endif /* IO_SWAGGER_CLIENT_API_UserEventApi_H_ */ + diff --git a/auto-generated/cpprest/model/APIKey.cpp b/auto-generated/cpprest/model/APIKey.cpp index b34259fed..236a64c49 100644 --- a/auto-generated/cpprest/model/APIKey.cpp +++ b/auto-generated/cpprest/model/APIKey.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -88,7 +88,11 @@ void APIKey::fromJson(web::json::value& val) setNonce(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("nonce")])); if(val.has_field(utility::conversions::to_string_t("cidr"))) { - setCidr(ModelBase::stringFromJson(val[utility::conversions::to_string_t("cidr")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("cidr")]; + if(!fieldValue.is_null()) + { + setCidr(ModelBase::stringFromJson(fieldValue)); + } } { m_Permissions.clear(); @@ -112,12 +116,20 @@ void APIKey::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("enabled"))) { - setEnabled(ModelBase::boolFromJson(val[utility::conversions::to_string_t("enabled")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("enabled")]; + if(!fieldValue.is_null()) + { + setEnabled(ModelBase::boolFromJson(fieldValue)); + } } setUserId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("userId")])); if(val.has_field(utility::conversions::to_string_t("created"))) { - setCreated(ModelBase::dateFromJson(val[utility::conversions::to_string_t("created")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("created")]; + if(!fieldValue.is_null()) + { + setCreated(ModelBase::dateFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/APIKey.h b/auto-generated/cpprest/model/APIKey.h index c351adf40..dde391cdd 100644 --- a/auto-generated/cpprest/model/APIKey.h +++ b/auto-generated/cpprest/model/APIKey.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/AccessToken.cpp b/auto-generated/cpprest/model/AccessToken.cpp index a7fdc05e1..257178c12 100644 --- a/auto-generated/cpprest/model/AccessToken.cpp +++ b/auto-generated/cpprest/model/AccessToken.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -65,15 +65,27 @@ void AccessToken::fromJson(web::json::value& val) setId(ModelBase::stringFromJson(val[utility::conversions::to_string_t("id")])); if(val.has_field(utility::conversions::to_string_t("ttl"))) { - setTtl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("ttl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("ttl")]; + if(!fieldValue.is_null()) + { + setTtl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("created"))) { - setCreated(ModelBase::dateFromJson(val[utility::conversions::to_string_t("created")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("created")]; + if(!fieldValue.is_null()) + { + setCreated(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("userId"))) { - setUserId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("userId")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("userId")]; + if(!fieldValue.is_null()) + { + setUserId(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/AccessToken.h b/auto-generated/cpprest/model/AccessToken.h index 43c225180..738e5f74d 100644 --- a/auto-generated/cpprest/model/AccessToken.h +++ b/auto-generated/cpprest/model/AccessToken.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Affiliate.cpp b/auto-generated/cpprest/model/Affiliate.cpp index 8154cdcfa..631d9cfd2 100644 --- a/auto-generated/cpprest/model/Affiliate.cpp +++ b/auto-generated/cpprest/model/Affiliate.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -49,6 +49,10 @@ Affiliate::Affiliate() m_TimestampIsSet = false; m_ReferrerAccount = 0.0; m_ReferrerAccountIsSet = false; + m_ReferralDiscount = 0.0; + m_ReferralDiscountIsSet = false; + m_AffiliatePayout = 0.0; + m_AffiliatePayoutIsSet = false; } Affiliate::~Affiliate() @@ -118,6 +122,14 @@ web::json::value Affiliate::toJson() const { val[utility::conversions::to_string_t("referrerAccount")] = ModelBase::toJson(m_ReferrerAccount); } + if(m_ReferralDiscountIsSet) + { + val[utility::conversions::to_string_t("referralDiscount")] = ModelBase::toJson(m_ReferralDiscount); + } + if(m_AffiliatePayoutIsSet) + { + val[utility::conversions::to_string_t("affiliatePayout")] = ModelBase::toJson(m_AffiliatePayout); + } return val; } @@ -128,55 +140,123 @@ void Affiliate::fromJson(web::json::value& val) setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); if(val.has_field(utility::conversions::to_string_t("prevPayout"))) { - setPrevPayout(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevPayout")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevPayout")]; + if(!fieldValue.is_null()) + { + setPrevPayout(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevTurnover"))) { - setPrevTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevTurnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevTurnover")]; + if(!fieldValue.is_null()) + { + setPrevTurnover(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevComm"))) { - setPrevComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevComm")]; + if(!fieldValue.is_null()) + { + setPrevComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevTimestamp"))) { - setPrevTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("prevTimestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevTimestamp")]; + if(!fieldValue.is_null()) + { + setPrevTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execTurnover"))) { - setExecTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execTurnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execTurnover")]; + if(!fieldValue.is_null()) + { + setExecTurnover(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execComm"))) { - setExecComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execComm")]; + if(!fieldValue.is_null()) + { + setExecComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("totalReferrals"))) { - setTotalReferrals(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("totalReferrals")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("totalReferrals")]; + if(!fieldValue.is_null()) + { + setTotalReferrals(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("totalTurnover"))) { - setTotalTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("totalTurnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("totalTurnover")]; + if(!fieldValue.is_null()) + { + setTotalTurnover(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("totalComm"))) { - setTotalComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("totalComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("totalComm")]; + if(!fieldValue.is_null()) + { + setTotalComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("payoutPcnt"))) { - setPayoutPcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("payoutPcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("payoutPcnt")]; + if(!fieldValue.is_null()) + { + setPayoutPcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pendingPayout"))) { - setPendingPayout(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("pendingPayout")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pendingPayout")]; + if(!fieldValue.is_null()) + { + setPendingPayout(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timestamp"))) { - setTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timestamp")]; + if(!fieldValue.is_null()) + { + setTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("referrerAccount"))) { - setReferrerAccount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("referrerAccount")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("referrerAccount")]; + if(!fieldValue.is_null()) + { + setReferrerAccount(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("referralDiscount"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("referralDiscount")]; + if(!fieldValue.is_null()) + { + setReferralDiscount(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("affiliatePayout"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("affiliatePayout")]; + if(!fieldValue.is_null()) + { + setAffiliatePayout(ModelBase::doubleFromJson(fieldValue)); + } } } @@ -244,6 +324,14 @@ void Affiliate::toMultipart(std::shared_ptr multipart, const { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("referrerAccount"), m_ReferrerAccount)); } + if(m_ReferralDiscountIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("referralDiscount"), m_ReferralDiscount)); + } + if(m_AffiliatePayoutIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("affiliatePayout"), m_AffiliatePayout)); + } } void Affiliate::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -308,6 +396,14 @@ void Affiliate::fromMultiPart(std::shared_ptr multipart, cons { setReferrerAccount(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("referrerAccount")))); } + if(multipart->hasContent(utility::conversions::to_string_t("referralDiscount"))) + { + setReferralDiscount(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("referralDiscount")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("affiliatePayout"))) + { + setAffiliatePayout(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("affiliatePayout")))); + } } double Affiliate::getAccount() const @@ -605,6 +701,48 @@ void Affiliate::unsetReferrerAccount() m_ReferrerAccountIsSet = false; } +double Affiliate::getReferralDiscount() const +{ + return m_ReferralDiscount; +} + + +void Affiliate::setReferralDiscount(double value) +{ + m_ReferralDiscount = value; + m_ReferralDiscountIsSet = true; +} +bool Affiliate::referralDiscountIsSet() const +{ + return m_ReferralDiscountIsSet; +} + +void Affiliate::unsetReferralDiscount() +{ + m_ReferralDiscountIsSet = false; +} + +double Affiliate::getAffiliatePayout() const +{ + return m_AffiliatePayout; +} + + +void Affiliate::setAffiliatePayout(double value) +{ + m_AffiliatePayout = value; + m_AffiliatePayoutIsSet = true; +} +bool Affiliate::affiliatePayoutIsSet() const +{ + return m_AffiliatePayoutIsSet; +} + +void Affiliate::unsetAffiliatePayout() +{ + m_AffiliatePayoutIsSet = false; +} + } } } diff --git a/auto-generated/cpprest/model/Affiliate.h b/auto-generated/cpprest/model/Affiliate.h index 9382713a8..827d2299c 100644 --- a/auto-generated/cpprest/model/Affiliate.h +++ b/auto-generated/cpprest/model/Affiliate.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -154,6 +154,20 @@ class Affiliate bool referrerAccountIsSet() const; void unsetReferrerAccount(); void setReferrerAccount(double value); + /// + /// + /// + double getReferralDiscount() const; + bool referralDiscountIsSet() const; + void unsetReferralDiscount(); + void setReferralDiscount(double value); + /// + /// + /// + double getAffiliatePayout() const; + bool affiliatePayoutIsSet() const; + void unsetAffiliatePayout(); + void setAffiliatePayout(double value); protected: double m_Account; @@ -184,6 +198,10 @@ class Affiliate bool m_TimestampIsSet; double m_ReferrerAccount; bool m_ReferrerAccountIsSet; + double m_ReferralDiscount; + bool m_ReferralDiscountIsSet; + double m_AffiliatePayout; + bool m_AffiliatePayoutIsSet; }; } diff --git a/auto-generated/cpprest/model/Announcement.cpp b/auto-generated/cpprest/model/Announcement.cpp index a29ece455..3713618a7 100644 --- a/auto-generated/cpprest/model/Announcement.cpp +++ b/auto-generated/cpprest/model/Announcement.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -71,19 +71,35 @@ void Announcement::fromJson(web::json::value& val) setId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("id")])); if(val.has_field(utility::conversions::to_string_t("link"))) { - setLink(ModelBase::stringFromJson(val[utility::conversions::to_string_t("link")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("link")]; + if(!fieldValue.is_null()) + { + setLink(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("title"))) { - setTitle(ModelBase::stringFromJson(val[utility::conversions::to_string_t("title")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("title")]; + if(!fieldValue.is_null()) + { + setTitle(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("content"))) { - setContent(ModelBase::stringFromJson(val[utility::conversions::to_string_t("content")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("content")]; + if(!fieldValue.is_null()) + { + setContent(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("date"))) { - setDate(ModelBase::dateFromJson(val[utility::conversions::to_string_t("date")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("date")]; + if(!fieldValue.is_null()) + { + setDate(ModelBase::dateFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Announcement.h b/auto-generated/cpprest/model/Announcement.h index 738be0c19..0f35c4d86 100644 --- a/auto-generated/cpprest/model/Announcement.h +++ b/auto-generated/cpprest/model/Announcement.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Chat.cpp b/auto-generated/cpprest/model/Chat.cpp index 9a4df424d..8efa336a0 100644 --- a/auto-generated/cpprest/model/Chat.cpp +++ b/auto-generated/cpprest/model/Chat.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -70,7 +70,11 @@ void Chat::fromJson(web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - setId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("id")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + if(!fieldValue.is_null()) + { + setId(ModelBase::doubleFromJson(fieldValue)); + } } setDate (ModelBase::dateFromJson(val[utility::conversions::to_string_t("date")])); @@ -79,11 +83,19 @@ void Chat::fromJson(web::json::value& val) setHtml(ModelBase::stringFromJson(val[utility::conversions::to_string_t("html")])); if(val.has_field(utility::conversions::to_string_t("fromBot"))) { - setFromBot(ModelBase::boolFromJson(val[utility::conversions::to_string_t("fromBot")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fromBot")]; + if(!fieldValue.is_null()) + { + setFromBot(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("channelID"))) { - setChannelID(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("channelID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("channelID")]; + if(!fieldValue.is_null()) + { + setChannelID(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Chat.h b/auto-generated/cpprest/model/Chat.h index eb6aa5847..1aae14f72 100644 --- a/auto-generated/cpprest/model/Chat.h +++ b/auto-generated/cpprest/model/Chat.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/ChatChannel.cpp b/auto-generated/cpprest/model/ChatChannel.cpp index 389ca26fd..740447d4f 100644 --- a/auto-generated/cpprest/model/ChatChannel.cpp +++ b/auto-generated/cpprest/model/ChatChannel.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -52,7 +52,11 @@ void ChatChannel::fromJson(web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - setId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("id")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + if(!fieldValue.is_null()) + { + setId(ModelBase::doubleFromJson(fieldValue)); + } } setName(ModelBase::stringFromJson(val[utility::conversions::to_string_t("name")])); } diff --git a/auto-generated/cpprest/model/ChatChannel.h b/auto-generated/cpprest/model/ChatChannel.h index 29fd2384d..516d3127f 100644 --- a/auto-generated/cpprest/model/ChatChannel.h +++ b/auto-generated/cpprest/model/ChatChannel.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/CommunicationToken.cpp b/auto-generated/cpprest/model/CommunicationToken.cpp new file mode 100644 index 000000000..2b7963208 --- /dev/null +++ b/auto-generated/cpprest/model/CommunicationToken.cpp @@ -0,0 +1,135 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + + +#include "CommunicationToken.h" + +namespace io { +namespace swagger { +namespace client { +namespace model { + +CommunicationToken::CommunicationToken() +{ + m_Id = utility::conversions::to_string_t(""); + m_UserId = 0.0; + m_DeviceToken = utility::conversions::to_string_t(""); + m_Channel = utility::conversions::to_string_t(""); +} + +CommunicationToken::~CommunicationToken() +{ +} + +void CommunicationToken::validate() +{ + // TODO: implement validation +} + +web::json::value CommunicationToken::toJson() const +{ + web::json::value val = web::json::value::object(); + + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(m_Id); + val[utility::conversions::to_string_t("userId")] = ModelBase::toJson(m_UserId); + val[utility::conversions::to_string_t("deviceToken")] = ModelBase::toJson(m_DeviceToken); + val[utility::conversions::to_string_t("channel")] = ModelBase::toJson(m_Channel); + + return val; +} + +void CommunicationToken::fromJson(web::json::value& val) +{ + setId(ModelBase::stringFromJson(val[utility::conversions::to_string_t("id")])); + setUserId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("userId")])); + setDeviceToken(ModelBase::stringFromJson(val[utility::conversions::to_string_t("deviceToken")])); + setChannel(ModelBase::stringFromJson(val[utility::conversions::to_string_t("channel")])); +} + +void CommunicationToken::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) + { + namePrefix += utility::conversions::to_string_t("."); + } + + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("id"), m_Id)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("userId"), m_UserId)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("deviceToken"), m_DeviceToken)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("channel"), m_Channel)); +} + +void CommunicationToken::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) + { + namePrefix += utility::conversions::to_string_t("."); + } + + setId(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("id")))); + setUserId(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("userId")))); + setDeviceToken(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("deviceToken")))); + setChannel(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("channel")))); +} + +utility::string_t CommunicationToken::getId() const +{ + return m_Id; +} + + +void CommunicationToken::setId(utility::string_t value) +{ + m_Id = value; + +} +double CommunicationToken::getUserId() const +{ + return m_UserId; +} + + +void CommunicationToken::setUserId(double value) +{ + m_UserId = value; + +} +utility::string_t CommunicationToken::getDeviceToken() const +{ + return m_DeviceToken; +} + + +void CommunicationToken::setDeviceToken(utility::string_t value) +{ + m_DeviceToken = value; + +} +utility::string_t CommunicationToken::getChannel() const +{ + return m_Channel; +} + + +void CommunicationToken::setChannel(utility::string_t value) +{ + m_Channel = value; + +} +} +} +} +} + diff --git a/auto-generated/cpprest/model/CommunicationToken.h b/auto-generated/cpprest/model/CommunicationToken.h new file mode 100644 index 000000000..6faf3971e --- /dev/null +++ b/auto-generated/cpprest/model/CommunicationToken.h @@ -0,0 +1,89 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * CommunicationToken.h + * + * User communication SNS token + */ + +#ifndef IO_SWAGGER_CLIENT_MODEL_CommunicationToken_H_ +#define IO_SWAGGER_CLIENT_MODEL_CommunicationToken_H_ + + +#include "../ModelBase.h" + +#include + +namespace io { +namespace swagger { +namespace client { +namespace model { + +/// +/// User communication SNS token +/// +class CommunicationToken + : public ModelBase +{ +public: + CommunicationToken(); + virtual ~CommunicationToken(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + + web::json::value toJson() const override; + void fromJson(web::json::value& json) override; + + void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; + void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; + + ///////////////////////////////////////////// + /// CommunicationToken members + + /// + /// + /// + utility::string_t getId() const; + void setId(utility::string_t value); + /// + /// + /// + double getUserId() const; + void setUserId(double value); + /// + /// + /// + utility::string_t getDeviceToken() const; + void setDeviceToken(utility::string_t value); + /// + /// + /// + utility::string_t getChannel() const; + void setChannel(utility::string_t value); + +protected: + utility::string_t m_Id; + double m_UserId; + utility::string_t m_DeviceToken; + utility::string_t m_Channel; + }; + +} +} +} +} + +#endif /* IO_SWAGGER_CLIENT_MODEL_CommunicationToken_H_ */ diff --git a/auto-generated/cpprest/model/ConnectedUsers.cpp b/auto-generated/cpprest/model/ConnectedUsers.cpp index 664beaa5d..d1335feee 100644 --- a/auto-generated/cpprest/model/ConnectedUsers.cpp +++ b/auto-generated/cpprest/model/ConnectedUsers.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -56,11 +56,19 @@ void ConnectedUsers::fromJson(web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("users"))) { - setUsers(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("users")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("users")]; + if(!fieldValue.is_null()) + { + setUsers(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("bots"))) { - setBots(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("bots")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("bots")]; + if(!fieldValue.is_null()) + { + setBots(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/ConnectedUsers.h b/auto-generated/cpprest/model/ConnectedUsers.h index e355601e5..fb5c69eb3 100644 --- a/auto-generated/cpprest/model/ConnectedUsers.h +++ b/auto-generated/cpprest/model/ConnectedUsers.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Error.cpp b/auto-generated/cpprest/model/Error.cpp index fb72561af..d8ade8918 100644 --- a/auto-generated/cpprest/model/Error.cpp +++ b/auto-generated/cpprest/model/Error.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Error.h b/auto-generated/cpprest/model/Error.h index 24bd18c69..f916d1d08 100644 --- a/auto-generated/cpprest/model/Error.h +++ b/auto-generated/cpprest/model/Error.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Error_error.cpp b/auto-generated/cpprest/model/Error_error.cpp index c0a327d76..70ecb6106 100644 --- a/auto-generated/cpprest/model/Error_error.cpp +++ b/auto-generated/cpprest/model/Error_error.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -56,11 +56,19 @@ void Error_error::fromJson(web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("message"))) { - setMessage(ModelBase::stringFromJson(val[utility::conversions::to_string_t("message")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("message")]; + if(!fieldValue.is_null()) + { + setMessage(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("name"))) { - setName(ModelBase::stringFromJson(val[utility::conversions::to_string_t("name")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("name")]; + if(!fieldValue.is_null()) + { + setName(ModelBase::stringFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Error_error.h b/auto-generated/cpprest/model/Error_error.h index ff2277303..a2b6dec66 100644 --- a/auto-generated/cpprest/model/Error_error.h +++ b/auto-generated/cpprest/model/Error_error.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Execution.cpp b/auto-generated/cpprest/model/Execution.cpp index 179edd20d..c49ce73c8 100644 --- a/auto-generated/cpprest/model/Execution.cpp +++ b/auto-generated/cpprest/model/Execution.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -323,187 +323,371 @@ void Execution::fromJson(web::json::value& val) setExecID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("execID")])); if(val.has_field(utility::conversions::to_string_t("orderID"))) { - setOrderID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("orderID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("orderID")]; + if(!fieldValue.is_null()) + { + setOrderID(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("clOrdID"))) { - setClOrdID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("clOrdID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("clOrdID")]; + if(!fieldValue.is_null()) + { + setClOrdID(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("clOrdLinkID"))) { - setClOrdLinkID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("clOrdLinkID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("clOrdLinkID")]; + if(!fieldValue.is_null()) + { + setClOrdLinkID(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("account"))) { - setAccount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("account")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("account")]; + if(!fieldValue.is_null()) + { + setAccount(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("symbol"))) { - setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("symbol")]; + if(!fieldValue.is_null()) + { + setSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("side"))) { - setSide(ModelBase::stringFromJson(val[utility::conversions::to_string_t("side")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("side")]; + if(!fieldValue.is_null()) + { + setSide(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastQty"))) { - setLastQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastQty")]; + if(!fieldValue.is_null()) + { + setLastQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastPx"))) { - setLastPx(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastPx")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastPx")]; + if(!fieldValue.is_null()) + { + setLastPx(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("underlyingLastPx"))) { - setUnderlyingLastPx(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("underlyingLastPx")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("underlyingLastPx")]; + if(!fieldValue.is_null()) + { + setUnderlyingLastPx(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastMkt"))) { - setLastMkt(ModelBase::stringFromJson(val[utility::conversions::to_string_t("lastMkt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastMkt")]; + if(!fieldValue.is_null()) + { + setLastMkt(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastLiquidityInd"))) { - setLastLiquidityInd(ModelBase::stringFromJson(val[utility::conversions::to_string_t("lastLiquidityInd")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastLiquidityInd")]; + if(!fieldValue.is_null()) + { + setLastLiquidityInd(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleOrderQty"))) { - setSimpleOrderQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleOrderQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleOrderQty")]; + if(!fieldValue.is_null()) + { + setSimpleOrderQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("orderQty"))) { - setOrderQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("orderQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("orderQty")]; + if(!fieldValue.is_null()) + { + setOrderQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("price"))) { - setPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("price")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("price")]; + if(!fieldValue.is_null()) + { + setPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("displayQty"))) { - setDisplayQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("displayQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("displayQty")]; + if(!fieldValue.is_null()) + { + setDisplayQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("stopPx"))) { - setStopPx(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("stopPx")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("stopPx")]; + if(!fieldValue.is_null()) + { + setStopPx(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pegOffsetValue"))) { - setPegOffsetValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("pegOffsetValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pegOffsetValue")]; + if(!fieldValue.is_null()) + { + setPegOffsetValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pegPriceType"))) { - setPegPriceType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("pegPriceType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pegPriceType")]; + if(!fieldValue.is_null()) + { + setPegPriceType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("currency"))) { - setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currency")]; + if(!fieldValue.is_null()) + { + setCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("settlCurrency"))) { - setSettlCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("settlCurrency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("settlCurrency")]; + if(!fieldValue.is_null()) + { + setSettlCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execType"))) { - setExecType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("execType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execType")]; + if(!fieldValue.is_null()) + { + setExecType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("ordType"))) { - setOrdType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("ordType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("ordType")]; + if(!fieldValue.is_null()) + { + setOrdType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timeInForce"))) { - setTimeInForce(ModelBase::stringFromJson(val[utility::conversions::to_string_t("timeInForce")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timeInForce")]; + if(!fieldValue.is_null()) + { + setTimeInForce(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execInst"))) { - setExecInst(ModelBase::stringFromJson(val[utility::conversions::to_string_t("execInst")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execInst")]; + if(!fieldValue.is_null()) + { + setExecInst(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("contingencyType"))) { - setContingencyType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("contingencyType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("contingencyType")]; + if(!fieldValue.is_null()) + { + setContingencyType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("exDestination"))) { - setExDestination(ModelBase::stringFromJson(val[utility::conversions::to_string_t("exDestination")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("exDestination")]; + if(!fieldValue.is_null()) + { + setExDestination(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("ordStatus"))) { - setOrdStatus(ModelBase::stringFromJson(val[utility::conversions::to_string_t("ordStatus")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("ordStatus")]; + if(!fieldValue.is_null()) + { + setOrdStatus(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("triggered"))) { - setTriggered(ModelBase::stringFromJson(val[utility::conversions::to_string_t("triggered")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("triggered")]; + if(!fieldValue.is_null()) + { + setTriggered(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("workingIndicator"))) { - setWorkingIndicator(ModelBase::boolFromJson(val[utility::conversions::to_string_t("workingIndicator")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("workingIndicator")]; + if(!fieldValue.is_null()) + { + setWorkingIndicator(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("ordRejReason"))) { - setOrdRejReason(ModelBase::stringFromJson(val[utility::conversions::to_string_t("ordRejReason")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("ordRejReason")]; + if(!fieldValue.is_null()) + { + setOrdRejReason(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleLeavesQty"))) { - setSimpleLeavesQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleLeavesQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleLeavesQty")]; + if(!fieldValue.is_null()) + { + setSimpleLeavesQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("leavesQty"))) { - setLeavesQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("leavesQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("leavesQty")]; + if(!fieldValue.is_null()) + { + setLeavesQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleCumQty"))) { - setSimpleCumQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleCumQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleCumQty")]; + if(!fieldValue.is_null()) + { + setSimpleCumQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("cumQty"))) { - setCumQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("cumQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("cumQty")]; + if(!fieldValue.is_null()) + { + setCumQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("avgPx"))) { - setAvgPx(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("avgPx")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("avgPx")]; + if(!fieldValue.is_null()) + { + setAvgPx(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("commission"))) { - setCommission(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("commission")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("commission")]; + if(!fieldValue.is_null()) + { + setCommission(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("tradePublishIndicator"))) { - setTradePublishIndicator(ModelBase::stringFromJson(val[utility::conversions::to_string_t("tradePublishIndicator")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("tradePublishIndicator")]; + if(!fieldValue.is_null()) + { + setTradePublishIndicator(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("multiLegReportingType"))) { - setMultiLegReportingType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("multiLegReportingType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("multiLegReportingType")]; + if(!fieldValue.is_null()) + { + setMultiLegReportingType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("text"))) { - setText(ModelBase::stringFromJson(val[utility::conversions::to_string_t("text")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("text")]; + if(!fieldValue.is_null()) + { + setText(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("trdMatchID"))) { - setTrdMatchID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("trdMatchID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("trdMatchID")]; + if(!fieldValue.is_null()) + { + setTrdMatchID(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execCost"))) { - setExecCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execCost")]; + if(!fieldValue.is_null()) + { + setExecCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execComm"))) { - setExecComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execComm")]; + if(!fieldValue.is_null()) + { + setExecComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("homeNotional"))) { - setHomeNotional(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("homeNotional")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("homeNotional")]; + if(!fieldValue.is_null()) + { + setHomeNotional(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("foreignNotional"))) { - setForeignNotional(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("foreignNotional")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("foreignNotional")]; + if(!fieldValue.is_null()) + { + setForeignNotional(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("transactTime"))) { - setTransactTime(ModelBase::dateFromJson(val[utility::conversions::to_string_t("transactTime")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("transactTime")]; + if(!fieldValue.is_null()) + { + setTransactTime(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timestamp"))) { - setTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timestamp")]; + if(!fieldValue.is_null()) + { + setTimestamp(ModelBase::dateFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Execution.h b/auto-generated/cpprest/model/Execution.h index 5d6b8d8fc..fc0d1ea87 100644 --- a/auto-generated/cpprest/model/Execution.h +++ b/auto-generated/cpprest/model/Execution.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Funding.cpp b/auto-generated/cpprest/model/Funding.cpp index aea1d7e5f..361298b13 100644 --- a/auto-generated/cpprest/model/Funding.cpp +++ b/auto-generated/cpprest/model/Funding.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -69,15 +69,27 @@ void Funding::fromJson(web::json::value& val) setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); if(val.has_field(utility::conversions::to_string_t("fundingInterval"))) { - setFundingInterval(ModelBase::dateFromJson(val[utility::conversions::to_string_t("fundingInterval")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingInterval")]; + if(!fieldValue.is_null()) + { + setFundingInterval(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fundingRate"))) { - setFundingRate(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("fundingRate")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingRate")]; + if(!fieldValue.is_null()) + { + setFundingRate(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fundingRateDaily"))) { - setFundingRateDaily(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("fundingRateDaily")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingRateDaily")]; + if(!fieldValue.is_null()) + { + setFundingRateDaily(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Funding.h b/auto-generated/cpprest/model/Funding.h index b3264a683..6c4fc0616 100644 --- a/auto-generated/cpprest/model/Funding.h +++ b/auto-generated/cpprest/model/Funding.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Notification.cpp b/auto-generated/cpprest/model/GlobalNotification.cpp similarity index 61% rename from auto-generated/cpprest/model/Notification.cpp rename to auto-generated/cpprest/model/GlobalNotification.cpp index ea25d2d7c..2e64ea03e 100644 --- a/auto-generated/cpprest/model/Notification.cpp +++ b/auto-generated/cpprest/model/GlobalNotification.cpp @@ -1,25 +1,25 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -#include "Notification.h" +#include "GlobalNotification.h" namespace io { namespace swagger { namespace client { namespace model { -Notification::Notification() +GlobalNotification::GlobalNotification() { m_Id = 0.0; m_IdIsSet = false; @@ -39,16 +39,16 @@ Notification::Notification() m_SoundIsSet = false; } -Notification::~Notification() +GlobalNotification::~GlobalNotification() { } -void Notification::validate() +void GlobalNotification::validate() { // TODO: implement validation } -web::json::value Notification::toJson() const +web::json::value GlobalNotification::toJson() const { web::json::value val = web::json::value::object(); @@ -84,11 +84,15 @@ web::json::value Notification::toJson() const return val; } -void Notification::fromJson(web::json::value& val) +void GlobalNotification::fromJson(web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - setId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("id")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + if(!fieldValue.is_null()) + { + setId(ModelBase::doubleFromJson(fieldValue)); + } } setDate (ModelBase::dateFromJson(val[utility::conversions::to_string_t("date")])); @@ -97,27 +101,47 @@ void Notification::fromJson(web::json::value& val) setTtl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("ttl")])); if(val.has_field(utility::conversions::to_string_t("type"))) { - setType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("type")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("type")]; + if(!fieldValue.is_null()) + { + setType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("closable"))) { - setClosable(ModelBase::boolFromJson(val[utility::conversions::to_string_t("closable")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("closable")]; + if(!fieldValue.is_null()) + { + setClosable(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("persist"))) { - setPersist(ModelBase::boolFromJson(val[utility::conversions::to_string_t("persist")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("persist")]; + if(!fieldValue.is_null()) + { + setPersist(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("waitForVisibility"))) { - setWaitForVisibility(ModelBase::boolFromJson(val[utility::conversions::to_string_t("waitForVisibility")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("waitForVisibility")]; + if(!fieldValue.is_null()) + { + setWaitForVisibility(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("sound"))) { - setSound(ModelBase::stringFromJson(val[utility::conversions::to_string_t("sound")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("sound")]; + if(!fieldValue.is_null()) + { + setSound(ModelBase::stringFromJson(fieldValue)); + } } } -void Notification::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +void GlobalNotification::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) @@ -157,7 +181,7 @@ void Notification::toMultipart(std::shared_ptr multipart, con } } -void Notification::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +void GlobalNotification::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) { utility::string_t namePrefix = prefix; if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) @@ -195,172 +219,172 @@ void Notification::fromMultiPart(std::shared_ptr multipart, c } } -double Notification::getId() const +double GlobalNotification::getId() const { return m_Id; } -void Notification::setId(double value) +void GlobalNotification::setId(double value) { m_Id = value; m_IdIsSet = true; } -bool Notification::idIsSet() const +bool GlobalNotification::idIsSet() const { return m_IdIsSet; } -void Notification::unsetId() +void GlobalNotification::unsetId() { m_IdIsSet = false; } -utility::datetime Notification::getDate() const +utility::datetime GlobalNotification::getDate() const { return m_date; } -void Notification::setDate(utility::datetime value) +void GlobalNotification::setDate(utility::datetime value) { m_date = value; } -utility::string_t Notification::getTitle() const +utility::string_t GlobalNotification::getTitle() const { return m_Title; } -void Notification::setTitle(utility::string_t value) +void GlobalNotification::setTitle(utility::string_t value) { m_Title = value; } -utility::string_t Notification::getBody() const +utility::string_t GlobalNotification::getBody() const { return m_Body; } -void Notification::setBody(utility::string_t value) +void GlobalNotification::setBody(utility::string_t value) { m_Body = value; } -double Notification::getTtl() const +double GlobalNotification::getTtl() const { return m_Ttl; } -void Notification::setTtl(double value) +void GlobalNotification::setTtl(double value) { m_Ttl = value; } -utility::string_t Notification::getType() const +utility::string_t GlobalNotification::getType() const { return m_Type; } -void Notification::setType(utility::string_t value) +void GlobalNotification::setType(utility::string_t value) { m_Type = value; m_TypeIsSet = true; } -bool Notification::typeIsSet() const +bool GlobalNotification::typeIsSet() const { return m_TypeIsSet; } -void Notification::unsetType() +void GlobalNotification::unsetType() { m_TypeIsSet = false; } -bool Notification::isClosable() const +bool GlobalNotification::isClosable() const { return m_Closable; } -void Notification::setClosable(bool value) +void GlobalNotification::setClosable(bool value) { m_Closable = value; m_ClosableIsSet = true; } -bool Notification::closableIsSet() const +bool GlobalNotification::closableIsSet() const { return m_ClosableIsSet; } -void Notification::unsetClosable() +void GlobalNotification::unsetClosable() { m_ClosableIsSet = false; } -bool Notification::isPersist() const +bool GlobalNotification::isPersist() const { return m_Persist; } -void Notification::setPersist(bool value) +void GlobalNotification::setPersist(bool value) { m_Persist = value; m_PersistIsSet = true; } -bool Notification::persistIsSet() const +bool GlobalNotification::persistIsSet() const { return m_PersistIsSet; } -void Notification::unsetPersist() +void GlobalNotification::unsetPersist() { m_PersistIsSet = false; } -bool Notification::isWaitForVisibility() const +bool GlobalNotification::isWaitForVisibility() const { return m_WaitForVisibility; } -void Notification::setWaitForVisibility(bool value) +void GlobalNotification::setWaitForVisibility(bool value) { m_WaitForVisibility = value; m_WaitForVisibilityIsSet = true; } -bool Notification::waitForVisibilityIsSet() const +bool GlobalNotification::waitForVisibilityIsSet() const { return m_WaitForVisibilityIsSet; } -void Notification::unsetWaitForVisibility() +void GlobalNotification::unsetWaitForVisibility() { m_WaitForVisibilityIsSet = false; } -utility::string_t Notification::getSound() const +utility::string_t GlobalNotification::getSound() const { return m_Sound; } -void Notification::setSound(utility::string_t value) +void GlobalNotification::setSound(utility::string_t value) { m_Sound = value; m_SoundIsSet = true; } -bool Notification::soundIsSet() const +bool GlobalNotification::soundIsSet() const { return m_SoundIsSet; } -void Notification::unsetSound() +void GlobalNotification::unsetSound() { m_SoundIsSet = false; } diff --git a/auto-generated/cpprest/model/Notification.h b/auto-generated/cpprest/model/GlobalNotification.h similarity index 63% rename from auto-generated/cpprest/model/Notification.h rename to auto-generated/cpprest/model/GlobalNotification.h index 7f928efc0..6d113e0d5 100644 --- a/auto-generated/cpprest/model/Notification.h +++ b/auto-generated/cpprest/model/GlobalNotification.h @@ -1,23 +1,23 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ /* - * Notification.h + * GlobalNotification.h * * Account Notifications */ -#ifndef IO_SWAGGER_CLIENT_MODEL_Notification_H_ -#define IO_SWAGGER_CLIENT_MODEL_Notification_H_ +#ifndef IO_SWAGGER_CLIENT_MODEL_GlobalNotification_H_ +#define IO_SWAGGER_CLIENT_MODEL_GlobalNotification_H_ #include "../ModelBase.h" @@ -32,12 +32,12 @@ namespace model { /// /// Account Notifications /// -class Notification +class GlobalNotification : public ModelBase { public: - Notification(); - virtual ~Notification(); + GlobalNotification(); + virtual ~GlobalNotification(); ///////////////////////////////////////////// /// ModelBase overrides @@ -51,7 +51,7 @@ class Notification void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; ///////////////////////////////////////////// - /// Notification members + /// GlobalNotification members /// /// @@ -140,4 +140,4 @@ class Notification } } -#endif /* IO_SWAGGER_CLIENT_MODEL_Notification_H_ */ +#endif /* IO_SWAGGER_CLIENT_MODEL_GlobalNotification_H_ */ diff --git a/auto-generated/cpprest/model/IndexComposite.cpp b/auto-generated/cpprest/model/IndexComposite.cpp index 5f7649825..ed8cde138 100644 --- a/auto-generated/cpprest/model/IndexComposite.cpp +++ b/auto-generated/cpprest/model/IndexComposite.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -84,27 +84,51 @@ void IndexComposite::fromJson(web::json::value& val) (ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); if(val.has_field(utility::conversions::to_string_t("symbol"))) { - setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("symbol")]; + if(!fieldValue.is_null()) + { + setSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("indexSymbol"))) { - setIndexSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("indexSymbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("indexSymbol")]; + if(!fieldValue.is_null()) + { + setIndexSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("reference"))) { - setReference(ModelBase::stringFromJson(val[utility::conversions::to_string_t("reference")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("reference")]; + if(!fieldValue.is_null()) + { + setReference(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastPrice"))) { - setLastPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastPrice")]; + if(!fieldValue.is_null()) + { + setLastPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("weight"))) { - setWeight(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("weight")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("weight")]; + if(!fieldValue.is_null()) + { + setWeight(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("logged"))) { - setLogged(ModelBase::dateFromJson(val[utility::conversions::to_string_t("logged")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("logged")]; + if(!fieldValue.is_null()) + { + setLogged(ModelBase::dateFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/IndexComposite.h b/auto-generated/cpprest/model/IndexComposite.h index b63c519e5..fcf1421c6 100644 --- a/auto-generated/cpprest/model/IndexComposite.h +++ b/auto-generated/cpprest/model/IndexComposite.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Inline_response_200.cpp b/auto-generated/cpprest/model/Inline_response_200.cpp index 37d61f472..bb8c9b16a 100644 --- a/auto-generated/cpprest/model/Inline_response_200.cpp +++ b/auto-generated/cpprest/model/Inline_response_200.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -21,8 +21,8 @@ namespace model { Inline_response_200::Inline_response_200() { - m_Success = false; - m_SuccessIsSet = false; + m_Name = utility::conversions::to_string_t(""); + m_NameIsSet = false; } Inline_response_200::~Inline_response_200() @@ -38,9 +38,9 @@ web::json::value Inline_response_200::toJson() const { web::json::value val = web::json::value::object(); - if(m_SuccessIsSet) + if(m_NameIsSet) { - val[utility::conversions::to_string_t("success")] = ModelBase::toJson(m_Success); + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(m_Name); } return val; @@ -48,9 +48,13 @@ web::json::value Inline_response_200::toJson() const void Inline_response_200::fromJson(web::json::value& val) { - if(val.has_field(utility::conversions::to_string_t("success"))) + if(val.has_field(utility::conversions::to_string_t("name"))) { - setSuccess(ModelBase::boolFromJson(val[utility::conversions::to_string_t("success")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("name")]; + if(!fieldValue.is_null()) + { + setName(ModelBase::stringFromJson(fieldValue)); + } } } @@ -62,9 +66,10 @@ void Inline_response_200::toMultipart(std::shared_ptr multipa namePrefix += utility::conversions::to_string_t("."); } - if(m_SuccessIsSet) + if(m_NameIsSet) { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("success"), m_Success)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("name"), m_Name)); + } } @@ -76,31 +81,31 @@ void Inline_response_200::fromMultiPart(std::shared_ptr multi namePrefix += utility::conversions::to_string_t("."); } - if(multipart->hasContent(utility::conversions::to_string_t("success"))) + if(multipart->hasContent(utility::conversions::to_string_t("name"))) { - setSuccess(ModelBase::boolFromHttpContent(multipart->getContent(utility::conversions::to_string_t("success")))); + setName(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("name")))); } } -bool Inline_response_200::isSuccess() const +utility::string_t Inline_response_200::getName() const { - return m_Success; + return m_Name; } -void Inline_response_200::setSuccess(bool value) +void Inline_response_200::setName(utility::string_t value) { - m_Success = value; - m_SuccessIsSet = true; + m_Name = value; + m_NameIsSet = true; } -bool Inline_response_200::successIsSet() const +bool Inline_response_200::nameIsSet() const { - return m_SuccessIsSet; + return m_NameIsSet; } -void Inline_response_200::unsetSuccess() +void Inline_response_200::unsetName() { - m_SuccessIsSet = false; + m_NameIsSet = false; } } diff --git a/auto-generated/cpprest/model/Inline_response_200.h b/auto-generated/cpprest/model/Inline_response_200.h index 00f656939..c3a47b983 100644 --- a/auto-generated/cpprest/model/Inline_response_200.h +++ b/auto-generated/cpprest/model/Inline_response_200.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -22,6 +22,7 @@ #include "../ModelBase.h" +#include namespace io { namespace swagger { @@ -55,14 +56,14 @@ class Inline_response_200 /// /// /// - bool isSuccess() const; - bool successIsSet() const; - void unsetSuccess(); - void setSuccess(bool value); + utility::string_t getName() const; + bool nameIsSet() const; + void unsetName(); + void setName(utility::string_t value); protected: - bool m_Success; - bool m_SuccessIsSet; + utility::string_t m_Name; + bool m_NameIsSet; }; } diff --git a/auto-generated/cpprest/model/Inline_response_200_1.cpp b/auto-generated/cpprest/model/Inline_response_200_1.cpp deleted file mode 100644 index cd13e1c2d..000000000 --- a/auto-generated/cpprest/model/Inline_response_200_1.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - - -#include "Inline_response_200_1.h" - -namespace io { -namespace swagger { -namespace client { -namespace model { - -Inline_response_200_1::Inline_response_200_1() -{ - m_Name = utility::conversions::to_string_t(""); - m_NameIsSet = false; -} - -Inline_response_200_1::~Inline_response_200_1() -{ -} - -void Inline_response_200_1::validate() -{ - // TODO: implement validation -} - -web::json::value Inline_response_200_1::toJson() const -{ - web::json::value val = web::json::value::object(); - - if(m_NameIsSet) - { - val[utility::conversions::to_string_t("name")] = ModelBase::toJson(m_Name); - } - - return val; -} - -void Inline_response_200_1::fromJson(web::json::value& val) -{ - if(val.has_field(utility::conversions::to_string_t("name"))) - { - setName(ModelBase::stringFromJson(val[utility::conversions::to_string_t("name")])); - } -} - -void Inline_response_200_1::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) - { - namePrefix += utility::conversions::to_string_t("."); - } - - if(m_NameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("name"), m_Name)); - - } -} - -void Inline_response_200_1::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) - { - namePrefix += utility::conversions::to_string_t("."); - } - - if(multipart->hasContent(utility::conversions::to_string_t("name"))) - { - setName(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("name")))); - } -} - -utility::string_t Inline_response_200_1::getName() const -{ - return m_Name; -} - - -void Inline_response_200_1::setName(utility::string_t value) -{ - m_Name = value; - m_NameIsSet = true; -} -bool Inline_response_200_1::nameIsSet() const -{ - return m_NameIsSet; -} - -void Inline_response_200_1::unsetName() -{ - m_NameIsSet = false; -} - -} -} -} -} - diff --git a/auto-generated/cpprest/model/Inline_response_200_1.h b/auto-generated/cpprest/model/Inline_response_200_1.h deleted file mode 100644 index b424377aa..000000000 --- a/auto-generated/cpprest/model/Inline_response_200_1.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -/* - * Inline_response_200_1.h - * - * - */ - -#ifndef IO_SWAGGER_CLIENT_MODEL_Inline_response_200_1_H_ -#define IO_SWAGGER_CLIENT_MODEL_Inline_response_200_1_H_ - - -#include "../ModelBase.h" - -#include - -namespace io { -namespace swagger { -namespace client { -namespace model { - -/// -/// -/// -class Inline_response_200_1 - : public ModelBase -{ -public: - Inline_response_200_1(); - virtual ~Inline_response_200_1(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - void fromJson(web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// Inline_response_200_1 members - - /// - /// - /// - utility::string_t getName() const; - bool nameIsSet() const; - void unsetName(); - void setName(utility::string_t value); - -protected: - utility::string_t m_Name; - bool m_NameIsSet; -}; - -} -} -} -} - -#endif /* IO_SWAGGER_CLIENT_MODEL_Inline_response_200_1_H_ */ diff --git a/auto-generated/cpprest/model/Instrument.cpp b/auto-generated/cpprest/model/Instrument.cpp index 81438f616..c8c9b9089 100644 --- a/auto-generated/cpprest/model/Instrument.cpp +++ b/auto-generated/cpprest/model/Instrument.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -166,6 +166,10 @@ Instrument::Instrument() m_TurnoverIsSet = false; m_Turnover24h = 0.0; m_Turnover24hIsSet = false; + m_HomeNotional24h = 0.0; + m_HomeNotional24hIsSet = false; + m_ForeignNotional24h = 0.0; + m_ForeignNotional24hIsSet = false; m_PrevPrice24h = 0.0; m_PrevPrice24hIsSet = false; m_Vwap = 0.0; @@ -526,6 +530,14 @@ web::json::value Instrument::toJson() const { val[utility::conversions::to_string_t("turnover24h")] = ModelBase::toJson(m_Turnover24h); } + if(m_HomeNotional24hIsSet) + { + val[utility::conversions::to_string_t("homeNotional24h")] = ModelBase::toJson(m_HomeNotional24h); + } + if(m_ForeignNotional24hIsSet) + { + val[utility::conversions::to_string_t("foreignNotional24h")] = ModelBase::toJson(m_ForeignNotional24h); + } if(m_PrevPrice24hIsSet) { val[utility::conversions::to_string_t("prevPrice24h")] = ModelBase::toJson(m_PrevPrice24h); @@ -647,403 +659,819 @@ void Instrument::fromJson(web::json::value& val) setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); if(val.has_field(utility::conversions::to_string_t("rootSymbol"))) { - setRootSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("rootSymbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("rootSymbol")]; + if(!fieldValue.is_null()) + { + setRootSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("state"))) { - setState(ModelBase::stringFromJson(val[utility::conversions::to_string_t("state")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("state")]; + if(!fieldValue.is_null()) + { + setState(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("typ"))) { - setTyp(ModelBase::stringFromJson(val[utility::conversions::to_string_t("typ")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("typ")]; + if(!fieldValue.is_null()) + { + setTyp(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("listing"))) { - setListing(ModelBase::dateFromJson(val[utility::conversions::to_string_t("listing")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("listing")]; + if(!fieldValue.is_null()) + { + setListing(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("front"))) { - setFront(ModelBase::dateFromJson(val[utility::conversions::to_string_t("front")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("front")]; + if(!fieldValue.is_null()) + { + setFront(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("expiry"))) { - setExpiry(ModelBase::dateFromJson(val[utility::conversions::to_string_t("expiry")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("expiry")]; + if(!fieldValue.is_null()) + { + setExpiry(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("settle"))) { - setSettle(ModelBase::dateFromJson(val[utility::conversions::to_string_t("settle")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("settle")]; + if(!fieldValue.is_null()) + { + setSettle(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("relistInterval"))) { - setRelistInterval(ModelBase::dateFromJson(val[utility::conversions::to_string_t("relistInterval")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("relistInterval")]; + if(!fieldValue.is_null()) + { + setRelistInterval(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("inverseLeg"))) { - setInverseLeg(ModelBase::stringFromJson(val[utility::conversions::to_string_t("inverseLeg")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("inverseLeg")]; + if(!fieldValue.is_null()) + { + setInverseLeg(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("sellLeg"))) { - setSellLeg(ModelBase::stringFromJson(val[utility::conversions::to_string_t("sellLeg")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("sellLeg")]; + if(!fieldValue.is_null()) + { + setSellLeg(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("buyLeg"))) { - setBuyLeg(ModelBase::stringFromJson(val[utility::conversions::to_string_t("buyLeg")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("buyLeg")]; + if(!fieldValue.is_null()) + { + setBuyLeg(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("optionStrikePcnt"))) { - setOptionStrikePcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("optionStrikePcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("optionStrikePcnt")]; + if(!fieldValue.is_null()) + { + setOptionStrikePcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("optionStrikeRound"))) { - setOptionStrikeRound(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("optionStrikeRound")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("optionStrikeRound")]; + if(!fieldValue.is_null()) + { + setOptionStrikeRound(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("optionStrikePrice"))) { - setOptionStrikePrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("optionStrikePrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("optionStrikePrice")]; + if(!fieldValue.is_null()) + { + setOptionStrikePrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("optionMultiplier"))) { - setOptionMultiplier(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("optionMultiplier")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("optionMultiplier")]; + if(!fieldValue.is_null()) + { + setOptionMultiplier(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("positionCurrency"))) { - setPositionCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("positionCurrency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("positionCurrency")]; + if(!fieldValue.is_null()) + { + setPositionCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("underlying"))) { - setUnderlying(ModelBase::stringFromJson(val[utility::conversions::to_string_t("underlying")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("underlying")]; + if(!fieldValue.is_null()) + { + setUnderlying(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("quoteCurrency"))) { - setQuoteCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("quoteCurrency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("quoteCurrency")]; + if(!fieldValue.is_null()) + { + setQuoteCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("underlyingSymbol"))) { - setUnderlyingSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("underlyingSymbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("underlyingSymbol")]; + if(!fieldValue.is_null()) + { + setUnderlyingSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("reference"))) { - setReference(ModelBase::stringFromJson(val[utility::conversions::to_string_t("reference")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("reference")]; + if(!fieldValue.is_null()) + { + setReference(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("referenceSymbol"))) { - setReferenceSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("referenceSymbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("referenceSymbol")]; + if(!fieldValue.is_null()) + { + setReferenceSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("calcInterval"))) { - setCalcInterval(ModelBase::dateFromJson(val[utility::conversions::to_string_t("calcInterval")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("calcInterval")]; + if(!fieldValue.is_null()) + { + setCalcInterval(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("publishInterval"))) { - setPublishInterval(ModelBase::dateFromJson(val[utility::conversions::to_string_t("publishInterval")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("publishInterval")]; + if(!fieldValue.is_null()) + { + setPublishInterval(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("publishTime"))) { - setPublishTime(ModelBase::dateFromJson(val[utility::conversions::to_string_t("publishTime")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("publishTime")]; + if(!fieldValue.is_null()) + { + setPublishTime(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("maxOrderQty"))) { - setMaxOrderQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("maxOrderQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("maxOrderQty")]; + if(!fieldValue.is_null()) + { + setMaxOrderQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("maxPrice"))) { - setMaxPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("maxPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("maxPrice")]; + if(!fieldValue.is_null()) + { + setMaxPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lotSize"))) { - setLotSize(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lotSize")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lotSize")]; + if(!fieldValue.is_null()) + { + setLotSize(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("tickSize"))) { - setTickSize(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("tickSize")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("tickSize")]; + if(!fieldValue.is_null()) + { + setTickSize(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("multiplier"))) { - setMultiplier(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("multiplier")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("multiplier")]; + if(!fieldValue.is_null()) + { + setMultiplier(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("settlCurrency"))) { - setSettlCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("settlCurrency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("settlCurrency")]; + if(!fieldValue.is_null()) + { + setSettlCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("underlyingToPositionMultiplier"))) { - setUnderlyingToPositionMultiplier(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("underlyingToPositionMultiplier")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("underlyingToPositionMultiplier")]; + if(!fieldValue.is_null()) + { + setUnderlyingToPositionMultiplier(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("underlyingToSettleMultiplier"))) { - setUnderlyingToSettleMultiplier(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("underlyingToSettleMultiplier")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("underlyingToSettleMultiplier")]; + if(!fieldValue.is_null()) + { + setUnderlyingToSettleMultiplier(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("quoteToSettleMultiplier"))) { - setQuoteToSettleMultiplier(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("quoteToSettleMultiplier")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("quoteToSettleMultiplier")]; + if(!fieldValue.is_null()) + { + setQuoteToSettleMultiplier(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("isQuanto"))) { - setIsQuanto(ModelBase::boolFromJson(val[utility::conversions::to_string_t("isQuanto")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("isQuanto")]; + if(!fieldValue.is_null()) + { + setIsQuanto(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("isInverse"))) { - setIsInverse(ModelBase::boolFromJson(val[utility::conversions::to_string_t("isInverse")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("isInverse")]; + if(!fieldValue.is_null()) + { + setIsInverse(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("initMargin"))) { - setInitMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("initMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("initMargin")]; + if(!fieldValue.is_null()) + { + setInitMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("maintMargin"))) { - setMaintMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("maintMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("maintMargin")]; + if(!fieldValue.is_null()) + { + setMaintMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("riskLimit"))) { - setRiskLimit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("riskLimit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("riskLimit")]; + if(!fieldValue.is_null()) + { + setRiskLimit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("riskStep"))) { - setRiskStep(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("riskStep")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("riskStep")]; + if(!fieldValue.is_null()) + { + setRiskStep(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("limit"))) { - setLimit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("limit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("limit")]; + if(!fieldValue.is_null()) + { + setLimit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("capped"))) { - setCapped(ModelBase::boolFromJson(val[utility::conversions::to_string_t("capped")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("capped")]; + if(!fieldValue.is_null()) + { + setCapped(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("taxed"))) { - setTaxed(ModelBase::boolFromJson(val[utility::conversions::to_string_t("taxed")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("taxed")]; + if(!fieldValue.is_null()) + { + setTaxed(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("deleverage"))) { - setDeleverage(ModelBase::boolFromJson(val[utility::conversions::to_string_t("deleverage")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("deleverage")]; + if(!fieldValue.is_null()) + { + setDeleverage(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("makerFee"))) { - setMakerFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("makerFee")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("makerFee")]; + if(!fieldValue.is_null()) + { + setMakerFee(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("takerFee"))) { - setTakerFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("takerFee")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("takerFee")]; + if(!fieldValue.is_null()) + { + setTakerFee(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("settlementFee"))) { - setSettlementFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("settlementFee")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("settlementFee")]; + if(!fieldValue.is_null()) + { + setSettlementFee(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("insuranceFee"))) { - setInsuranceFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("insuranceFee")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("insuranceFee")]; + if(!fieldValue.is_null()) + { + setInsuranceFee(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fundingBaseSymbol"))) { - setFundingBaseSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("fundingBaseSymbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingBaseSymbol")]; + if(!fieldValue.is_null()) + { + setFundingBaseSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fundingQuoteSymbol"))) { - setFundingQuoteSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("fundingQuoteSymbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingQuoteSymbol")]; + if(!fieldValue.is_null()) + { + setFundingQuoteSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fundingPremiumSymbol"))) { - setFundingPremiumSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("fundingPremiumSymbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingPremiumSymbol")]; + if(!fieldValue.is_null()) + { + setFundingPremiumSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fundingTimestamp"))) { - setFundingTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("fundingTimestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingTimestamp")]; + if(!fieldValue.is_null()) + { + setFundingTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fundingInterval"))) { - setFundingInterval(ModelBase::dateFromJson(val[utility::conversions::to_string_t("fundingInterval")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingInterval")]; + if(!fieldValue.is_null()) + { + setFundingInterval(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fundingRate"))) { - setFundingRate(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("fundingRate")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fundingRate")]; + if(!fieldValue.is_null()) + { + setFundingRate(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("indicativeFundingRate"))) { - setIndicativeFundingRate(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("indicativeFundingRate")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("indicativeFundingRate")]; + if(!fieldValue.is_null()) + { + setIndicativeFundingRate(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("rebalanceTimestamp"))) { - setRebalanceTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("rebalanceTimestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("rebalanceTimestamp")]; + if(!fieldValue.is_null()) + { + setRebalanceTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("rebalanceInterval"))) { - setRebalanceInterval(ModelBase::dateFromJson(val[utility::conversions::to_string_t("rebalanceInterval")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("rebalanceInterval")]; + if(!fieldValue.is_null()) + { + setRebalanceInterval(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openingTimestamp"))) { - setOpeningTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("openingTimestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openingTimestamp")]; + if(!fieldValue.is_null()) + { + setOpeningTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("closingTimestamp"))) { - setClosingTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("closingTimestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("closingTimestamp")]; + if(!fieldValue.is_null()) + { + setClosingTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("sessionInterval"))) { - setSessionInterval(ModelBase::dateFromJson(val[utility::conversions::to_string_t("sessionInterval")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("sessionInterval")]; + if(!fieldValue.is_null()) + { + setSessionInterval(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevClosePrice"))) { - setPrevClosePrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevClosePrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevClosePrice")]; + if(!fieldValue.is_null()) + { + setPrevClosePrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("limitDownPrice"))) { - setLimitDownPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("limitDownPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("limitDownPrice")]; + if(!fieldValue.is_null()) + { + setLimitDownPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("limitUpPrice"))) { - setLimitUpPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("limitUpPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("limitUpPrice")]; + if(!fieldValue.is_null()) + { + setLimitUpPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("bankruptLimitDownPrice"))) { - setBankruptLimitDownPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("bankruptLimitDownPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("bankruptLimitDownPrice")]; + if(!fieldValue.is_null()) + { + setBankruptLimitDownPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("bankruptLimitUpPrice"))) { - setBankruptLimitUpPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("bankruptLimitUpPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("bankruptLimitUpPrice")]; + if(!fieldValue.is_null()) + { + setBankruptLimitUpPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevTotalVolume"))) { - setPrevTotalVolume(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevTotalVolume")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevTotalVolume")]; + if(!fieldValue.is_null()) + { + setPrevTotalVolume(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("totalVolume"))) { - setTotalVolume(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("totalVolume")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("totalVolume")]; + if(!fieldValue.is_null()) + { + setTotalVolume(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("volume"))) { - setVolume(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("volume")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("volume")]; + if(!fieldValue.is_null()) + { + setVolume(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("volume24h"))) { - setVolume24h(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("volume24h")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("volume24h")]; + if(!fieldValue.is_null()) + { + setVolume24h(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevTotalTurnover"))) { - setPrevTotalTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevTotalTurnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevTotalTurnover")]; + if(!fieldValue.is_null()) + { + setPrevTotalTurnover(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("totalTurnover"))) { - setTotalTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("totalTurnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("totalTurnover")]; + if(!fieldValue.is_null()) + { + setTotalTurnover(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover"))) { - setTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover")]; + if(!fieldValue.is_null()) + { + setTurnover(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover24h"))) { - setTurnover24h(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover24h")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover24h")]; + if(!fieldValue.is_null()) + { + setTurnover24h(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("homeNotional24h"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("homeNotional24h")]; + if(!fieldValue.is_null()) + { + setHomeNotional24h(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("foreignNotional24h"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("foreignNotional24h")]; + if(!fieldValue.is_null()) + { + setForeignNotional24h(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevPrice24h"))) { - setPrevPrice24h(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevPrice24h")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevPrice24h")]; + if(!fieldValue.is_null()) + { + setPrevPrice24h(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("vwap"))) { - setVwap(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("vwap")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("vwap")]; + if(!fieldValue.is_null()) + { + setVwap(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("highPrice"))) { - setHighPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("highPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("highPrice")]; + if(!fieldValue.is_null()) + { + setHighPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lowPrice"))) { - setLowPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lowPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lowPrice")]; + if(!fieldValue.is_null()) + { + setLowPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastPrice"))) { - setLastPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastPrice")]; + if(!fieldValue.is_null()) + { + setLastPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastPriceProtected"))) { - setLastPriceProtected(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastPriceProtected")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastPriceProtected")]; + if(!fieldValue.is_null()) + { + setLastPriceProtected(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastTickDirection"))) { - setLastTickDirection(ModelBase::stringFromJson(val[utility::conversions::to_string_t("lastTickDirection")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastTickDirection")]; + if(!fieldValue.is_null()) + { + setLastTickDirection(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastChangePcnt"))) { - setLastChangePcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastChangePcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastChangePcnt")]; + if(!fieldValue.is_null()) + { + setLastChangePcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("bidPrice"))) { - setBidPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("bidPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("bidPrice")]; + if(!fieldValue.is_null()) + { + setBidPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("midPrice"))) { - setMidPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("midPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("midPrice")]; + if(!fieldValue.is_null()) + { + setMidPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("askPrice"))) { - setAskPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("askPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("askPrice")]; + if(!fieldValue.is_null()) + { + setAskPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("impactBidPrice"))) { - setImpactBidPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("impactBidPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("impactBidPrice")]; + if(!fieldValue.is_null()) + { + setImpactBidPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("impactMidPrice"))) { - setImpactMidPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("impactMidPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("impactMidPrice")]; + if(!fieldValue.is_null()) + { + setImpactMidPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("impactAskPrice"))) { - setImpactAskPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("impactAskPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("impactAskPrice")]; + if(!fieldValue.is_null()) + { + setImpactAskPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("hasLiquidity"))) { - setHasLiquidity(ModelBase::boolFromJson(val[utility::conversions::to_string_t("hasLiquidity")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("hasLiquidity")]; + if(!fieldValue.is_null()) + { + setHasLiquidity(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openInterest"))) { - setOpenInterest(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openInterest")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openInterest")]; + if(!fieldValue.is_null()) + { + setOpenInterest(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openValue"))) { - setOpenValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openValue")]; + if(!fieldValue.is_null()) + { + setOpenValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fairMethod"))) { - setFairMethod(ModelBase::stringFromJson(val[utility::conversions::to_string_t("fairMethod")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fairMethod")]; + if(!fieldValue.is_null()) + { + setFairMethod(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fairBasisRate"))) { - setFairBasisRate(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("fairBasisRate")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fairBasisRate")]; + if(!fieldValue.is_null()) + { + setFairBasisRate(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fairBasis"))) { - setFairBasis(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("fairBasis")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fairBasis")]; + if(!fieldValue.is_null()) + { + setFairBasis(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fairPrice"))) { - setFairPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("fairPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fairPrice")]; + if(!fieldValue.is_null()) + { + setFairPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("markMethod"))) { - setMarkMethod(ModelBase::stringFromJson(val[utility::conversions::to_string_t("markMethod")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("markMethod")]; + if(!fieldValue.is_null()) + { + setMarkMethod(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("markPrice"))) { - setMarkPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("markPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("markPrice")]; + if(!fieldValue.is_null()) + { + setMarkPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("indicativeTaxRate"))) { - setIndicativeTaxRate(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("indicativeTaxRate")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("indicativeTaxRate")]; + if(!fieldValue.is_null()) + { + setIndicativeTaxRate(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("indicativeSettlePrice"))) { - setIndicativeSettlePrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("indicativeSettlePrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("indicativeSettlePrice")]; + if(!fieldValue.is_null()) + { + setIndicativeSettlePrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("optionUnderlyingPrice"))) { - setOptionUnderlyingPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("optionUnderlyingPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("optionUnderlyingPrice")]; + if(!fieldValue.is_null()) + { + setOptionUnderlyingPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("settledPrice"))) { - setSettledPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("settledPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("settledPrice")]; + if(!fieldValue.is_null()) + { + setSettledPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timestamp"))) { - setTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timestamp")]; + if(!fieldValue.is_null()) + { + setTimestamp(ModelBase::dateFromJson(fieldValue)); + } } } @@ -1375,6 +1803,14 @@ void Instrument::toMultipart(std::shared_ptr multipart, const { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("turnover24h"), m_Turnover24h)); } + if(m_HomeNotional24hIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("homeNotional24h"), m_HomeNotional24h)); + } + if(m_ForeignNotional24hIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("foreignNotional24h"), m_ForeignNotional24h)); + } if(m_PrevPrice24hIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("prevPrice24h"), m_PrevPrice24h)); @@ -1790,6 +2226,14 @@ void Instrument::fromMultiPart(std::shared_ptr multipart, con { setTurnover24h(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("turnover24h")))); } + if(multipart->hasContent(utility::conversions::to_string_t("homeNotional24h"))) + { + setHomeNotional24h(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("homeNotional24h")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("foreignNotional24h"))) + { + setForeignNotional24h(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("foreignNotional24h")))); + } if(multipart->hasContent(utility::conversions::to_string_t("prevPrice24h"))) { setPrevPrice24h(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("prevPrice24h")))); @@ -3427,6 +3871,48 @@ void Instrument::unsetTurnover24h() m_Turnover24hIsSet = false; } +double Instrument::getHomeNotional24h() const +{ + return m_HomeNotional24h; +} + + +void Instrument::setHomeNotional24h(double value) +{ + m_HomeNotional24h = value; + m_HomeNotional24hIsSet = true; +} +bool Instrument::homeNotional24hIsSet() const +{ + return m_HomeNotional24hIsSet; +} + +void Instrument::unsetHomeNotional24h() +{ + m_HomeNotional24hIsSet = false; +} + +double Instrument::getForeignNotional24h() const +{ + return m_ForeignNotional24h; +} + + +void Instrument::setForeignNotional24h(double value) +{ + m_ForeignNotional24h = value; + m_ForeignNotional24hIsSet = true; +} +bool Instrument::foreignNotional24hIsSet() const +{ + return m_ForeignNotional24hIsSet; +} + +void Instrument::unsetForeignNotional24h() +{ + m_ForeignNotional24hIsSet = false; +} + double Instrument::getPrevPrice24h() const { return m_PrevPrice24h; diff --git a/auto-generated/cpprest/model/Instrument.h b/auto-generated/cpprest/model/Instrument.h index 99ea2c275..2db95ddf3 100644 --- a/auto-generated/cpprest/model/Instrument.h +++ b/auto-generated/cpprest/model/Instrument.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -565,6 +565,20 @@ class Instrument /// /// /// + double getHomeNotional24h() const; + bool homeNotional24hIsSet() const; + void unsetHomeNotional24h(); + void setHomeNotional24h(double value); + /// + /// + /// + double getForeignNotional24h() const; + bool foreignNotional24hIsSet() const; + void unsetForeignNotional24h(); + void setForeignNotional24h(double value); + /// + /// + /// double getPrevPrice24h() const; bool prevPrice24hIsSet() const; void unsetPrevPrice24h(); @@ -905,6 +919,10 @@ class Instrument bool m_TurnoverIsSet; double m_Turnover24h; bool m_Turnover24hIsSet; + double m_HomeNotional24h; + bool m_HomeNotional24hIsSet; + double m_ForeignNotional24h; + bool m_ForeignNotional24hIsSet; double m_PrevPrice24h; bool m_PrevPrice24hIsSet; double m_Vwap; diff --git a/auto-generated/cpprest/model/InstrumentInterval.cpp b/auto-generated/cpprest/model/InstrumentInterval.cpp index 7e9afe9bc..88e30e4b0 100644 --- a/auto-generated/cpprest/model/InstrumentInterval.cpp +++ b/auto-generated/cpprest/model/InstrumentInterval.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/InstrumentInterval.h b/auto-generated/cpprest/model/InstrumentInterval.h index c6af9b300..639c1739d 100644 --- a/auto-generated/cpprest/model/InstrumentInterval.h +++ b/auto-generated/cpprest/model/InstrumentInterval.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Insurance.cpp b/auto-generated/cpprest/model/Insurance.cpp index b9ae7e842..92d1aa34a 100644 --- a/auto-generated/cpprest/model/Insurance.cpp +++ b/auto-generated/cpprest/model/Insurance.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -57,7 +57,11 @@ void Insurance::fromJson(web::json::value& val) (ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); if(val.has_field(utility::conversions::to_string_t("walletBalance"))) { - setWalletBalance(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("walletBalance")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("walletBalance")]; + if(!fieldValue.is_null()) + { + setWalletBalance(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Insurance.h b/auto-generated/cpprest/model/Insurance.h index 215874798..ced2cba3b 100644 --- a/auto-generated/cpprest/model/Insurance.h +++ b/auto-generated/cpprest/model/Insurance.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Leaderboard.cpp b/auto-generated/cpprest/model/Leaderboard.cpp index 0609e5031..4c9c4ef41 100644 --- a/auto-generated/cpprest/model/Leaderboard.cpp +++ b/auto-generated/cpprest/model/Leaderboard.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -59,11 +59,19 @@ void Leaderboard::fromJson(web::json::value& val) setName(ModelBase::stringFromJson(val[utility::conversions::to_string_t("name")])); if(val.has_field(utility::conversions::to_string_t("isRealName"))) { - setIsRealName(ModelBase::boolFromJson(val[utility::conversions::to_string_t("isRealName")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("isRealName")]; + if(!fieldValue.is_null()) + { + setIsRealName(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("profit"))) { - setProfit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("profit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("profit")]; + if(!fieldValue.is_null()) + { + setProfit(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Leaderboard.h b/auto-generated/cpprest/model/Leaderboard.h index 73a525f8c..3a4d4e4e3 100644 --- a/auto-generated/cpprest/model/Leaderboard.h +++ b/auto-generated/cpprest/model/Leaderboard.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Liquidation.cpp b/auto-generated/cpprest/model/Liquidation.cpp index 4d2a916a0..928172763 100644 --- a/auto-generated/cpprest/model/Liquidation.cpp +++ b/auto-generated/cpprest/model/Liquidation.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -71,19 +71,35 @@ void Liquidation::fromJson(web::json::value& val) setOrderID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("orderID")])); if(val.has_field(utility::conversions::to_string_t("symbol"))) { - setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("symbol")]; + if(!fieldValue.is_null()) + { + setSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("side"))) { - setSide(ModelBase::stringFromJson(val[utility::conversions::to_string_t("side")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("side")]; + if(!fieldValue.is_null()) + { + setSide(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("price"))) { - setPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("price")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("price")]; + if(!fieldValue.is_null()) + { + setPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("leavesQty"))) { - setLeavesQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("leavesQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("leavesQty")]; + if(!fieldValue.is_null()) + { + setLeavesQty(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Liquidation.h b/auto-generated/cpprest/model/Liquidation.h index 7093b316b..01cca8e7b 100644 --- a/auto-generated/cpprest/model/Liquidation.h +++ b/auto-generated/cpprest/model/Liquidation.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Margin.cpp b/auto-generated/cpprest/model/Margin.cpp index 0417e40b6..6805784f0 100644 --- a/auto-generated/cpprest/model/Margin.cpp +++ b/auto-generated/cpprest/model/Margin.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -284,159 +284,315 @@ void Margin::fromJson(web::json::value& val) setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); if(val.has_field(utility::conversions::to_string_t("riskLimit"))) { - setRiskLimit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("riskLimit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("riskLimit")]; + if(!fieldValue.is_null()) + { + setRiskLimit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevState"))) { - setPrevState(ModelBase::stringFromJson(val[utility::conversions::to_string_t("prevState")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevState")]; + if(!fieldValue.is_null()) + { + setPrevState(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("state"))) { - setState(ModelBase::stringFromJson(val[utility::conversions::to_string_t("state")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("state")]; + if(!fieldValue.is_null()) + { + setState(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("action"))) { - setAction(ModelBase::stringFromJson(val[utility::conversions::to_string_t("action")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("action")]; + if(!fieldValue.is_null()) + { + setAction(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("amount"))) { - setAmount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("amount")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("amount")]; + if(!fieldValue.is_null()) + { + setAmount(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pendingCredit"))) { - setPendingCredit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("pendingCredit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pendingCredit")]; + if(!fieldValue.is_null()) + { + setPendingCredit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pendingDebit"))) { - setPendingDebit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("pendingDebit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pendingDebit")]; + if(!fieldValue.is_null()) + { + setPendingDebit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("confirmedDebit"))) { - setConfirmedDebit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("confirmedDebit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("confirmedDebit")]; + if(!fieldValue.is_null()) + { + setConfirmedDebit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevRealisedPnl"))) { - setPrevRealisedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevRealisedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevRealisedPnl")]; + if(!fieldValue.is_null()) + { + setPrevRealisedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevUnrealisedPnl"))) { - setPrevUnrealisedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevUnrealisedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevUnrealisedPnl")]; + if(!fieldValue.is_null()) + { + setPrevUnrealisedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossComm"))) { - setGrossComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossComm")]; + if(!fieldValue.is_null()) + { + setGrossComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossOpenCost"))) { - setGrossOpenCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossOpenCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossOpenCost")]; + if(!fieldValue.is_null()) + { + setGrossOpenCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossOpenPremium"))) { - setGrossOpenPremium(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossOpenPremium")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossOpenPremium")]; + if(!fieldValue.is_null()) + { + setGrossOpenPremium(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossExecCost"))) { - setGrossExecCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossExecCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossExecCost")]; + if(!fieldValue.is_null()) + { + setGrossExecCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossMarkValue"))) { - setGrossMarkValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossMarkValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossMarkValue")]; + if(!fieldValue.is_null()) + { + setGrossMarkValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("riskValue"))) { - setRiskValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("riskValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("riskValue")]; + if(!fieldValue.is_null()) + { + setRiskValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("taxableMargin"))) { - setTaxableMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("taxableMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("taxableMargin")]; + if(!fieldValue.is_null()) + { + setTaxableMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("initMargin"))) { - setInitMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("initMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("initMargin")]; + if(!fieldValue.is_null()) + { + setInitMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("maintMargin"))) { - setMaintMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("maintMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("maintMargin")]; + if(!fieldValue.is_null()) + { + setMaintMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("sessionMargin"))) { - setSessionMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("sessionMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("sessionMargin")]; + if(!fieldValue.is_null()) + { + setSessionMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("targetExcessMargin"))) { - setTargetExcessMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("targetExcessMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("targetExcessMargin")]; + if(!fieldValue.is_null()) + { + setTargetExcessMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("varMargin"))) { - setVarMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("varMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("varMargin")]; + if(!fieldValue.is_null()) + { + setVarMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("realisedPnl"))) { - setRealisedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("realisedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("realisedPnl")]; + if(!fieldValue.is_null()) + { + setRealisedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("unrealisedPnl"))) { - setUnrealisedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("unrealisedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("unrealisedPnl")]; + if(!fieldValue.is_null()) + { + setUnrealisedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("indicativeTax"))) { - setIndicativeTax(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("indicativeTax")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("indicativeTax")]; + if(!fieldValue.is_null()) + { + setIndicativeTax(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("unrealisedProfit"))) { - setUnrealisedProfit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("unrealisedProfit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("unrealisedProfit")]; + if(!fieldValue.is_null()) + { + setUnrealisedProfit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("syntheticMargin"))) { - setSyntheticMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("syntheticMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("syntheticMargin")]; + if(!fieldValue.is_null()) + { + setSyntheticMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("walletBalance"))) { - setWalletBalance(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("walletBalance")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("walletBalance")]; + if(!fieldValue.is_null()) + { + setWalletBalance(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("marginBalance"))) { - setMarginBalance(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("marginBalance")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("marginBalance")]; + if(!fieldValue.is_null()) + { + setMarginBalance(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("marginBalancePcnt"))) { - setMarginBalancePcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("marginBalancePcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("marginBalancePcnt")]; + if(!fieldValue.is_null()) + { + setMarginBalancePcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("marginLeverage"))) { - setMarginLeverage(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("marginLeverage")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("marginLeverage")]; + if(!fieldValue.is_null()) + { + setMarginLeverage(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("marginUsedPcnt"))) { - setMarginUsedPcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("marginUsedPcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("marginUsedPcnt")]; + if(!fieldValue.is_null()) + { + setMarginUsedPcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("excessMargin"))) { - setExcessMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("excessMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("excessMargin")]; + if(!fieldValue.is_null()) + { + setExcessMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("excessMarginPcnt"))) { - setExcessMarginPcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("excessMarginPcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("excessMarginPcnt")]; + if(!fieldValue.is_null()) + { + setExcessMarginPcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("availableMargin"))) { - setAvailableMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("availableMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("availableMargin")]; + if(!fieldValue.is_null()) + { + setAvailableMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("withdrawableMargin"))) { - setWithdrawableMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("withdrawableMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("withdrawableMargin")]; + if(!fieldValue.is_null()) + { + setWithdrawableMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timestamp"))) { - setTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timestamp")]; + if(!fieldValue.is_null()) + { + setTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossLastValue"))) { - setGrossLastValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossLastValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossLastValue")]; + if(!fieldValue.is_null()) + { + setGrossLastValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("commission"))) { - setCommission(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("commission")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("commission")]; + if(!fieldValue.is_null()) + { + setCommission(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Margin.h b/auto-generated/cpprest/model/Margin.h index c0ed6e08e..bab20c642 100644 --- a/auto-generated/cpprest/model/Margin.h +++ b/auto-generated/cpprest/model/Margin.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Order.cpp b/auto-generated/cpprest/model/Order.cpp index 407f62ddf..8a256949b 100644 --- a/auto-generated/cpprest/model/Order.cpp +++ b/auto-generated/cpprest/model/Order.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -239,131 +239,259 @@ void Order::fromJson(web::json::value& val) setOrderID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("orderID")])); if(val.has_field(utility::conversions::to_string_t("clOrdID"))) { - setClOrdID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("clOrdID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("clOrdID")]; + if(!fieldValue.is_null()) + { + setClOrdID(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("clOrdLinkID"))) { - setClOrdLinkID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("clOrdLinkID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("clOrdLinkID")]; + if(!fieldValue.is_null()) + { + setClOrdLinkID(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("account"))) { - setAccount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("account")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("account")]; + if(!fieldValue.is_null()) + { + setAccount(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("symbol"))) { - setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("symbol")]; + if(!fieldValue.is_null()) + { + setSymbol(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("side"))) { - setSide(ModelBase::stringFromJson(val[utility::conversions::to_string_t("side")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("side")]; + if(!fieldValue.is_null()) + { + setSide(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleOrderQty"))) { - setSimpleOrderQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleOrderQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleOrderQty")]; + if(!fieldValue.is_null()) + { + setSimpleOrderQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("orderQty"))) { - setOrderQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("orderQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("orderQty")]; + if(!fieldValue.is_null()) + { + setOrderQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("price"))) { - setPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("price")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("price")]; + if(!fieldValue.is_null()) + { + setPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("displayQty"))) { - setDisplayQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("displayQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("displayQty")]; + if(!fieldValue.is_null()) + { + setDisplayQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("stopPx"))) { - setStopPx(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("stopPx")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("stopPx")]; + if(!fieldValue.is_null()) + { + setStopPx(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pegOffsetValue"))) { - setPegOffsetValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("pegOffsetValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pegOffsetValue")]; + if(!fieldValue.is_null()) + { + setPegOffsetValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pegPriceType"))) { - setPegPriceType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("pegPriceType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pegPriceType")]; + if(!fieldValue.is_null()) + { + setPegPriceType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("currency"))) { - setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currency")]; + if(!fieldValue.is_null()) + { + setCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("settlCurrency"))) { - setSettlCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("settlCurrency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("settlCurrency")]; + if(!fieldValue.is_null()) + { + setSettlCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("ordType"))) { - setOrdType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("ordType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("ordType")]; + if(!fieldValue.is_null()) + { + setOrdType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timeInForce"))) { - setTimeInForce(ModelBase::stringFromJson(val[utility::conversions::to_string_t("timeInForce")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timeInForce")]; + if(!fieldValue.is_null()) + { + setTimeInForce(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execInst"))) { - setExecInst(ModelBase::stringFromJson(val[utility::conversions::to_string_t("execInst")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execInst")]; + if(!fieldValue.is_null()) + { + setExecInst(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("contingencyType"))) { - setContingencyType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("contingencyType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("contingencyType")]; + if(!fieldValue.is_null()) + { + setContingencyType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("exDestination"))) { - setExDestination(ModelBase::stringFromJson(val[utility::conversions::to_string_t("exDestination")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("exDestination")]; + if(!fieldValue.is_null()) + { + setExDestination(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("ordStatus"))) { - setOrdStatus(ModelBase::stringFromJson(val[utility::conversions::to_string_t("ordStatus")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("ordStatus")]; + if(!fieldValue.is_null()) + { + setOrdStatus(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("triggered"))) { - setTriggered(ModelBase::stringFromJson(val[utility::conversions::to_string_t("triggered")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("triggered")]; + if(!fieldValue.is_null()) + { + setTriggered(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("workingIndicator"))) { - setWorkingIndicator(ModelBase::boolFromJson(val[utility::conversions::to_string_t("workingIndicator")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("workingIndicator")]; + if(!fieldValue.is_null()) + { + setWorkingIndicator(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("ordRejReason"))) { - setOrdRejReason(ModelBase::stringFromJson(val[utility::conversions::to_string_t("ordRejReason")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("ordRejReason")]; + if(!fieldValue.is_null()) + { + setOrdRejReason(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleLeavesQty"))) { - setSimpleLeavesQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleLeavesQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleLeavesQty")]; + if(!fieldValue.is_null()) + { + setSimpleLeavesQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("leavesQty"))) { - setLeavesQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("leavesQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("leavesQty")]; + if(!fieldValue.is_null()) + { + setLeavesQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleCumQty"))) { - setSimpleCumQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleCumQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleCumQty")]; + if(!fieldValue.is_null()) + { + setSimpleCumQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("cumQty"))) { - setCumQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("cumQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("cumQty")]; + if(!fieldValue.is_null()) + { + setCumQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("avgPx"))) { - setAvgPx(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("avgPx")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("avgPx")]; + if(!fieldValue.is_null()) + { + setAvgPx(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("multiLegReportingType"))) { - setMultiLegReportingType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("multiLegReportingType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("multiLegReportingType")]; + if(!fieldValue.is_null()) + { + setMultiLegReportingType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("text"))) { - setText(ModelBase::stringFromJson(val[utility::conversions::to_string_t("text")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("text")]; + if(!fieldValue.is_null()) + { + setText(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("transactTime"))) { - setTransactTime(ModelBase::dateFromJson(val[utility::conversions::to_string_t("transactTime")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("transactTime")]; + if(!fieldValue.is_null()) + { + setTransactTime(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timestamp"))) { - setTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timestamp")]; + if(!fieldValue.is_null()) + { + setTimestamp(ModelBase::dateFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Order.h b/auto-generated/cpprest/model/Order.h index a5e64c268..25053e795 100644 --- a/auto-generated/cpprest/model/Order.h +++ b/auto-generated/cpprest/model/Order.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/OrderBookL2.cpp b/auto-generated/cpprest/model/OrderBookL2.cpp index fe8396a79..4a7673e6d 100644 --- a/auto-generated/cpprest/model/OrderBookL2.cpp +++ b/auto-generated/cpprest/model/OrderBookL2.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -65,11 +65,19 @@ void OrderBookL2::fromJson(web::json::value& val) setSide(ModelBase::stringFromJson(val[utility::conversions::to_string_t("side")])); if(val.has_field(utility::conversions::to_string_t("size"))) { - setSize(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("size")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("size")]; + if(!fieldValue.is_null()) + { + setSize(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("price"))) { - setPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("price")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("price")]; + if(!fieldValue.is_null()) + { + setPrice(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/OrderBookL2.h b/auto-generated/cpprest/model/OrderBookL2.h index ee8c3cf3e..0b2d261cf 100644 --- a/auto-generated/cpprest/model/OrderBookL2.h +++ b/auto-generated/cpprest/model/OrderBookL2.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Position.cpp b/auto-generated/cpprest/model/Position.cpp index 0eefb40f8..1d8b4321d 100644 --- a/auto-generated/cpprest/model/Position.cpp +++ b/auto-generated/cpprest/model/Position.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -581,355 +581,707 @@ void Position::fromJson(web::json::value& val) setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); if(val.has_field(utility::conversions::to_string_t("underlying"))) { - setUnderlying(ModelBase::stringFromJson(val[utility::conversions::to_string_t("underlying")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("underlying")]; + if(!fieldValue.is_null()) + { + setUnderlying(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("quoteCurrency"))) { - setQuoteCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("quoteCurrency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("quoteCurrency")]; + if(!fieldValue.is_null()) + { + setQuoteCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("commission"))) { - setCommission(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("commission")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("commission")]; + if(!fieldValue.is_null()) + { + setCommission(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("initMarginReq"))) { - setInitMarginReq(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("initMarginReq")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("initMarginReq")]; + if(!fieldValue.is_null()) + { + setInitMarginReq(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("maintMarginReq"))) { - setMaintMarginReq(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("maintMarginReq")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("maintMarginReq")]; + if(!fieldValue.is_null()) + { + setMaintMarginReq(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("riskLimit"))) { - setRiskLimit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("riskLimit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("riskLimit")]; + if(!fieldValue.is_null()) + { + setRiskLimit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("leverage"))) { - setLeverage(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("leverage")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("leverage")]; + if(!fieldValue.is_null()) + { + setLeverage(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("crossMargin"))) { - setCrossMargin(ModelBase::boolFromJson(val[utility::conversions::to_string_t("crossMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("crossMargin")]; + if(!fieldValue.is_null()) + { + setCrossMargin(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("deleveragePercentile"))) { - setDeleveragePercentile(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("deleveragePercentile")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("deleveragePercentile")]; + if(!fieldValue.is_null()) + { + setDeleveragePercentile(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("rebalancedPnl"))) { - setRebalancedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("rebalancedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("rebalancedPnl")]; + if(!fieldValue.is_null()) + { + setRebalancedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevRealisedPnl"))) { - setPrevRealisedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevRealisedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevRealisedPnl")]; + if(!fieldValue.is_null()) + { + setPrevRealisedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevUnrealisedPnl"))) { - setPrevUnrealisedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevUnrealisedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevUnrealisedPnl")]; + if(!fieldValue.is_null()) + { + setPrevUnrealisedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevClosePrice"))) { - setPrevClosePrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevClosePrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevClosePrice")]; + if(!fieldValue.is_null()) + { + setPrevClosePrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openingTimestamp"))) { - setOpeningTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("openingTimestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openingTimestamp")]; + if(!fieldValue.is_null()) + { + setOpeningTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openingQty"))) { - setOpeningQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openingQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openingQty")]; + if(!fieldValue.is_null()) + { + setOpeningQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openingCost"))) { - setOpeningCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openingCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openingCost")]; + if(!fieldValue.is_null()) + { + setOpeningCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openingComm"))) { - setOpeningComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openingComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openingComm")]; + if(!fieldValue.is_null()) + { + setOpeningComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openOrderBuyQty"))) { - setOpenOrderBuyQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openOrderBuyQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openOrderBuyQty")]; + if(!fieldValue.is_null()) + { + setOpenOrderBuyQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openOrderBuyCost"))) { - setOpenOrderBuyCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openOrderBuyCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openOrderBuyCost")]; + if(!fieldValue.is_null()) + { + setOpenOrderBuyCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openOrderBuyPremium"))) { - setOpenOrderBuyPremium(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openOrderBuyPremium")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openOrderBuyPremium")]; + if(!fieldValue.is_null()) + { + setOpenOrderBuyPremium(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openOrderSellQty"))) { - setOpenOrderSellQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openOrderSellQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openOrderSellQty")]; + if(!fieldValue.is_null()) + { + setOpenOrderSellQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openOrderSellCost"))) { - setOpenOrderSellCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openOrderSellCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openOrderSellCost")]; + if(!fieldValue.is_null()) + { + setOpenOrderSellCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openOrderSellPremium"))) { - setOpenOrderSellPremium(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openOrderSellPremium")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openOrderSellPremium")]; + if(!fieldValue.is_null()) + { + setOpenOrderSellPremium(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execBuyQty"))) { - setExecBuyQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execBuyQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execBuyQty")]; + if(!fieldValue.is_null()) + { + setExecBuyQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execBuyCost"))) { - setExecBuyCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execBuyCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execBuyCost")]; + if(!fieldValue.is_null()) + { + setExecBuyCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execSellQty"))) { - setExecSellQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execSellQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execSellQty")]; + if(!fieldValue.is_null()) + { + setExecSellQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execSellCost"))) { - setExecSellCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execSellCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execSellCost")]; + if(!fieldValue.is_null()) + { + setExecSellCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execQty"))) { - setExecQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execQty")]; + if(!fieldValue.is_null()) + { + setExecQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execCost"))) { - setExecCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execCost")]; + if(!fieldValue.is_null()) + { + setExecCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("execComm"))) { - setExecComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("execComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("execComm")]; + if(!fieldValue.is_null()) + { + setExecComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("currentTimestamp"))) { - setCurrentTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("currentTimestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currentTimestamp")]; + if(!fieldValue.is_null()) + { + setCurrentTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("currentQty"))) { - setCurrentQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("currentQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currentQty")]; + if(!fieldValue.is_null()) + { + setCurrentQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("currentCost"))) { - setCurrentCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("currentCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currentCost")]; + if(!fieldValue.is_null()) + { + setCurrentCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("currentComm"))) { - setCurrentComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("currentComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currentComm")]; + if(!fieldValue.is_null()) + { + setCurrentComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("realisedCost"))) { - setRealisedCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("realisedCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("realisedCost")]; + if(!fieldValue.is_null()) + { + setRealisedCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("unrealisedCost"))) { - setUnrealisedCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("unrealisedCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("unrealisedCost")]; + if(!fieldValue.is_null()) + { + setUnrealisedCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossOpenCost"))) { - setGrossOpenCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossOpenCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossOpenCost")]; + if(!fieldValue.is_null()) + { + setGrossOpenCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossOpenPremium"))) { - setGrossOpenPremium(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossOpenPremium")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossOpenPremium")]; + if(!fieldValue.is_null()) + { + setGrossOpenPremium(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossExecCost"))) { - setGrossExecCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossExecCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossExecCost")]; + if(!fieldValue.is_null()) + { + setGrossExecCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("isOpen"))) { - setIsOpen(ModelBase::boolFromJson(val[utility::conversions::to_string_t("isOpen")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("isOpen")]; + if(!fieldValue.is_null()) + { + setIsOpen(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("markPrice"))) { - setMarkPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("markPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("markPrice")]; + if(!fieldValue.is_null()) + { + setMarkPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("markValue"))) { - setMarkValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("markValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("markValue")]; + if(!fieldValue.is_null()) + { + setMarkValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("riskValue"))) { - setRiskValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("riskValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("riskValue")]; + if(!fieldValue.is_null()) + { + setRiskValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("homeNotional"))) { - setHomeNotional(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("homeNotional")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("homeNotional")]; + if(!fieldValue.is_null()) + { + setHomeNotional(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("foreignNotional"))) { - setForeignNotional(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("foreignNotional")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("foreignNotional")]; + if(!fieldValue.is_null()) + { + setForeignNotional(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posState"))) { - setPosState(ModelBase::stringFromJson(val[utility::conversions::to_string_t("posState")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posState")]; + if(!fieldValue.is_null()) + { + setPosState(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posCost"))) { - setPosCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posCost")]; + if(!fieldValue.is_null()) + { + setPosCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posCost2"))) { - setPosCost2(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posCost2")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posCost2")]; + if(!fieldValue.is_null()) + { + setPosCost2(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posCross"))) { - setPosCross(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posCross")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posCross")]; + if(!fieldValue.is_null()) + { + setPosCross(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posInit"))) { - setPosInit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posInit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posInit")]; + if(!fieldValue.is_null()) + { + setPosInit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posComm"))) { - setPosComm(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posComm")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posComm")]; + if(!fieldValue.is_null()) + { + setPosComm(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posLoss"))) { - setPosLoss(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posLoss")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posLoss")]; + if(!fieldValue.is_null()) + { + setPosLoss(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posMargin"))) { - setPosMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posMargin")]; + if(!fieldValue.is_null()) + { + setPosMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posMaint"))) { - setPosMaint(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posMaint")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posMaint")]; + if(!fieldValue.is_null()) + { + setPosMaint(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("posAllowance"))) { - setPosAllowance(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("posAllowance")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("posAllowance")]; + if(!fieldValue.is_null()) + { + setPosAllowance(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("taxableMargin"))) { - setTaxableMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("taxableMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("taxableMargin")]; + if(!fieldValue.is_null()) + { + setTaxableMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("initMargin"))) { - setInitMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("initMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("initMargin")]; + if(!fieldValue.is_null()) + { + setInitMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("maintMargin"))) { - setMaintMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("maintMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("maintMargin")]; + if(!fieldValue.is_null()) + { + setMaintMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("sessionMargin"))) { - setSessionMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("sessionMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("sessionMargin")]; + if(!fieldValue.is_null()) + { + setSessionMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("targetExcessMargin"))) { - setTargetExcessMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("targetExcessMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("targetExcessMargin")]; + if(!fieldValue.is_null()) + { + setTargetExcessMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("varMargin"))) { - setVarMargin(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("varMargin")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("varMargin")]; + if(!fieldValue.is_null()) + { + setVarMargin(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("realisedGrossPnl"))) { - setRealisedGrossPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("realisedGrossPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("realisedGrossPnl")]; + if(!fieldValue.is_null()) + { + setRealisedGrossPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("realisedTax"))) { - setRealisedTax(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("realisedTax")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("realisedTax")]; + if(!fieldValue.is_null()) + { + setRealisedTax(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("realisedPnl"))) { - setRealisedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("realisedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("realisedPnl")]; + if(!fieldValue.is_null()) + { + setRealisedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("unrealisedGrossPnl"))) { - setUnrealisedGrossPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("unrealisedGrossPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("unrealisedGrossPnl")]; + if(!fieldValue.is_null()) + { + setUnrealisedGrossPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("longBankrupt"))) { - setLongBankrupt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("longBankrupt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("longBankrupt")]; + if(!fieldValue.is_null()) + { + setLongBankrupt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("shortBankrupt"))) { - setShortBankrupt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("shortBankrupt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("shortBankrupt")]; + if(!fieldValue.is_null()) + { + setShortBankrupt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("taxBase"))) { - setTaxBase(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("taxBase")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("taxBase")]; + if(!fieldValue.is_null()) + { + setTaxBase(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("indicativeTaxRate"))) { - setIndicativeTaxRate(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("indicativeTaxRate")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("indicativeTaxRate")]; + if(!fieldValue.is_null()) + { + setIndicativeTaxRate(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("indicativeTax"))) { - setIndicativeTax(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("indicativeTax")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("indicativeTax")]; + if(!fieldValue.is_null()) + { + setIndicativeTax(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("unrealisedTax"))) { - setUnrealisedTax(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("unrealisedTax")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("unrealisedTax")]; + if(!fieldValue.is_null()) + { + setUnrealisedTax(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("unrealisedPnl"))) { - setUnrealisedPnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("unrealisedPnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("unrealisedPnl")]; + if(!fieldValue.is_null()) + { + setUnrealisedPnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("unrealisedPnlPcnt"))) { - setUnrealisedPnlPcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("unrealisedPnlPcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("unrealisedPnlPcnt")]; + if(!fieldValue.is_null()) + { + setUnrealisedPnlPcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("unrealisedRoePcnt"))) { - setUnrealisedRoePcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("unrealisedRoePcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("unrealisedRoePcnt")]; + if(!fieldValue.is_null()) + { + setUnrealisedRoePcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleQty"))) { - setSimpleQty(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleQty")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleQty")]; + if(!fieldValue.is_null()) + { + setSimpleQty(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleCost"))) { - setSimpleCost(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleCost")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleCost")]; + if(!fieldValue.is_null()) + { + setSimpleCost(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simpleValue"))) { - setSimpleValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simpleValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simpleValue")]; + if(!fieldValue.is_null()) + { + setSimpleValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simplePnl"))) { - setSimplePnl(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simplePnl")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simplePnl")]; + if(!fieldValue.is_null()) + { + setSimplePnl(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("simplePnlPcnt"))) { - setSimplePnlPcnt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("simplePnlPcnt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("simplePnlPcnt")]; + if(!fieldValue.is_null()) + { + setSimplePnlPcnt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("avgCostPrice"))) { - setAvgCostPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("avgCostPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("avgCostPrice")]; + if(!fieldValue.is_null()) + { + setAvgCostPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("avgEntryPrice"))) { - setAvgEntryPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("avgEntryPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("avgEntryPrice")]; + if(!fieldValue.is_null()) + { + setAvgEntryPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("breakEvenPrice"))) { - setBreakEvenPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("breakEvenPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("breakEvenPrice")]; + if(!fieldValue.is_null()) + { + setBreakEvenPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("marginCallPrice"))) { - setMarginCallPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("marginCallPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("marginCallPrice")]; + if(!fieldValue.is_null()) + { + setMarginCallPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("liquidationPrice"))) { - setLiquidationPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("liquidationPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("liquidationPrice")]; + if(!fieldValue.is_null()) + { + setLiquidationPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("bankruptPrice"))) { - setBankruptPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("bankruptPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("bankruptPrice")]; + if(!fieldValue.is_null()) + { + setBankruptPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timestamp"))) { - setTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timestamp")]; + if(!fieldValue.is_null()) + { + setTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastPrice"))) { - setLastPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastPrice")]; + if(!fieldValue.is_null()) + { + setLastPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastValue"))) { - setLastValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastValue")]; + if(!fieldValue.is_null()) + { + setLastValue(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Position.h b/auto-generated/cpprest/model/Position.h index 0f37651d2..b1c768533 100644 --- a/auto-generated/cpprest/model/Position.h +++ b/auto-generated/cpprest/model/Position.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Quote.cpp b/auto-generated/cpprest/model/Quote.cpp index 260db3019..345db3f18 100644 --- a/auto-generated/cpprest/model/Quote.cpp +++ b/auto-generated/cpprest/model/Quote.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -75,19 +75,35 @@ void Quote::fromJson(web::json::value& val) setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); if(val.has_field(utility::conversions::to_string_t("bidSize"))) { - setBidSize(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("bidSize")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("bidSize")]; + if(!fieldValue.is_null()) + { + setBidSize(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("bidPrice"))) { - setBidPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("bidPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("bidPrice")]; + if(!fieldValue.is_null()) + { + setBidPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("askPrice"))) { - setAskPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("askPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("askPrice")]; + if(!fieldValue.is_null()) + { + setAskPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("askSize"))) { - setAskSize(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("askSize")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("askSize")]; + if(!fieldValue.is_null()) + { + setAskSize(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Quote.h b/auto-generated/cpprest/model/Quote.h index f61973098..766766ffc 100644 --- a/auto-generated/cpprest/model/Quote.h +++ b/auto-generated/cpprest/model/Quote.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/QuoteFillRatio.cpp b/auto-generated/cpprest/model/QuoteFillRatio.cpp new file mode 100644 index 000000000..e52cacfb3 --- /dev/null +++ b/auto-generated/cpprest/model/QuoteFillRatio.cpp @@ -0,0 +1,346 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + + +#include "QuoteFillRatio.h" + +namespace io { +namespace swagger { +namespace client { +namespace model { + +QuoteFillRatio::QuoteFillRatio() +{ + m_date = utility::datetime(); + m_Account = 0.0; + m_AccountIsSet = false; + m_QuoteCount = 0.0; + m_QuoteCountIsSet = false; + m_DealtCount = 0.0; + m_DealtCountIsSet = false; + m_QuotesMavg7 = 0.0; + m_QuotesMavg7IsSet = false; + m_DealtMavg7 = 0.0; + m_DealtMavg7IsSet = false; + m_QuoteFillRatioMavg7 = 0.0; + m_QuoteFillRatioMavg7IsSet = false; +} + +QuoteFillRatio::~QuoteFillRatio() +{ +} + +void QuoteFillRatio::validate() +{ + // TODO: implement validation +} + +web::json::value QuoteFillRatio::toJson() const +{ + web::json::value val = web::json::value::object(); + + val[utility::conversions::to_string_t("date")] = ModelBase::toJson(m_date); + if(m_AccountIsSet) + { + val[utility::conversions::to_string_t("account")] = ModelBase::toJson(m_Account); + } + if(m_QuoteCountIsSet) + { + val[utility::conversions::to_string_t("quoteCount")] = ModelBase::toJson(m_QuoteCount); + } + if(m_DealtCountIsSet) + { + val[utility::conversions::to_string_t("dealtCount")] = ModelBase::toJson(m_DealtCount); + } + if(m_QuotesMavg7IsSet) + { + val[utility::conversions::to_string_t("quotesMavg7")] = ModelBase::toJson(m_QuotesMavg7); + } + if(m_DealtMavg7IsSet) + { + val[utility::conversions::to_string_t("dealtMavg7")] = ModelBase::toJson(m_DealtMavg7); + } + if(m_QuoteFillRatioMavg7IsSet) + { + val[utility::conversions::to_string_t("quoteFillRatioMavg7")] = ModelBase::toJson(m_QuoteFillRatioMavg7); + } + + return val; +} + +void QuoteFillRatio::fromJson(web::json::value& val) +{ + setDate + (ModelBase::dateFromJson(val[utility::conversions::to_string_t("date")])); + if(val.has_field(utility::conversions::to_string_t("account"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("account")]; + if(!fieldValue.is_null()) + { + setAccount(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("quoteCount"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("quoteCount")]; + if(!fieldValue.is_null()) + { + setQuoteCount(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("dealtCount"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("dealtCount")]; + if(!fieldValue.is_null()) + { + setDealtCount(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("quotesMavg7"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("quotesMavg7")]; + if(!fieldValue.is_null()) + { + setQuotesMavg7(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("dealtMavg7"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("dealtMavg7")]; + if(!fieldValue.is_null()) + { + setDealtMavg7(ModelBase::doubleFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("quoteFillRatioMavg7"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("quoteFillRatioMavg7")]; + if(!fieldValue.is_null()) + { + setQuoteFillRatioMavg7(ModelBase::doubleFromJson(fieldValue)); + } + } +} + +void QuoteFillRatio::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) + { + namePrefix += utility::conversions::to_string_t("."); + } + + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("date"), m_date)); + if(m_AccountIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("account"), m_Account)); + } + if(m_QuoteCountIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("quoteCount"), m_QuoteCount)); + } + if(m_DealtCountIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("dealtCount"), m_DealtCount)); + } + if(m_QuotesMavg7IsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("quotesMavg7"), m_QuotesMavg7)); + } + if(m_DealtMavg7IsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("dealtMavg7"), m_DealtMavg7)); + } + if(m_QuoteFillRatioMavg7IsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("quoteFillRatioMavg7"), m_QuoteFillRatioMavg7)); + } +} + +void QuoteFillRatio::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) + { + namePrefix += utility::conversions::to_string_t("."); + } + + setDate(ModelBase::dateFromHttpContent(multipart->getContent(utility::conversions::to_string_t("date")))); + if(multipart->hasContent(utility::conversions::to_string_t("account"))) + { + setAccount(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("account")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("quoteCount"))) + { + setQuoteCount(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("quoteCount")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("dealtCount"))) + { + setDealtCount(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("dealtCount")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("quotesMavg7"))) + { + setQuotesMavg7(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("quotesMavg7")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("dealtMavg7"))) + { + setDealtMavg7(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("dealtMavg7")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("quoteFillRatioMavg7"))) + { + setQuoteFillRatioMavg7(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("quoteFillRatioMavg7")))); + } +} + +utility::datetime QuoteFillRatio::getDate() const +{ + return m_date; +} + + +void QuoteFillRatio::setDate(utility::datetime value) +{ + m_date = value; + +} +double QuoteFillRatio::getAccount() const +{ + return m_Account; +} + + +void QuoteFillRatio::setAccount(double value) +{ + m_Account = value; + m_AccountIsSet = true; +} +bool QuoteFillRatio::accountIsSet() const +{ + return m_AccountIsSet; +} + +void QuoteFillRatio::unsetAccount() +{ + m_AccountIsSet = false; +} + +double QuoteFillRatio::getQuoteCount() const +{ + return m_QuoteCount; +} + + +void QuoteFillRatio::setQuoteCount(double value) +{ + m_QuoteCount = value; + m_QuoteCountIsSet = true; +} +bool QuoteFillRatio::quoteCountIsSet() const +{ + return m_QuoteCountIsSet; +} + +void QuoteFillRatio::unsetQuoteCount() +{ + m_QuoteCountIsSet = false; +} + +double QuoteFillRatio::getDealtCount() const +{ + return m_DealtCount; +} + + +void QuoteFillRatio::setDealtCount(double value) +{ + m_DealtCount = value; + m_DealtCountIsSet = true; +} +bool QuoteFillRatio::dealtCountIsSet() const +{ + return m_DealtCountIsSet; +} + +void QuoteFillRatio::unsetDealtCount() +{ + m_DealtCountIsSet = false; +} + +double QuoteFillRatio::getQuotesMavg7() const +{ + return m_QuotesMavg7; +} + + +void QuoteFillRatio::setQuotesMavg7(double value) +{ + m_QuotesMavg7 = value; + m_QuotesMavg7IsSet = true; +} +bool QuoteFillRatio::quotesMavg7IsSet() const +{ + return m_QuotesMavg7IsSet; +} + +void QuoteFillRatio::unsetQuotesMavg7() +{ + m_QuotesMavg7IsSet = false; +} + +double QuoteFillRatio::getDealtMavg7() const +{ + return m_DealtMavg7; +} + + +void QuoteFillRatio::setDealtMavg7(double value) +{ + m_DealtMavg7 = value; + m_DealtMavg7IsSet = true; +} +bool QuoteFillRatio::dealtMavg7IsSet() const +{ + return m_DealtMavg7IsSet; +} + +void QuoteFillRatio::unsetDealtMavg7() +{ + m_DealtMavg7IsSet = false; +} + +double QuoteFillRatio::getQuoteFillRatioMavg7() const +{ + return m_QuoteFillRatioMavg7; +} + + +void QuoteFillRatio::setQuoteFillRatioMavg7(double value) +{ + m_QuoteFillRatioMavg7 = value; + m_QuoteFillRatioMavg7IsSet = true; +} +bool QuoteFillRatio::quoteFillRatioMavg7IsSet() const +{ + return m_QuoteFillRatioMavg7IsSet; +} + +void QuoteFillRatio::unsetQuoteFillRatioMavg7() +{ + m_QuoteFillRatioMavg7IsSet = false; +} + +} +} +} +} + diff --git a/auto-generated/cpprest/model/QuoteFillRatio.h b/auto-generated/cpprest/model/QuoteFillRatio.h new file mode 100644 index 000000000..75ec6237f --- /dev/null +++ b/auto-generated/cpprest/model/QuoteFillRatio.h @@ -0,0 +1,125 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * QuoteFillRatio.h + * + * Daily Quote Fill Ratio Statistic + */ + +#ifndef IO_SWAGGER_CLIENT_MODEL_QuoteFillRatio_H_ +#define IO_SWAGGER_CLIENT_MODEL_QuoteFillRatio_H_ + + +#include "../ModelBase.h" + +#include + +namespace io { +namespace swagger { +namespace client { +namespace model { + +/// +/// Daily Quote Fill Ratio Statistic +/// +class QuoteFillRatio + : public ModelBase +{ +public: + QuoteFillRatio(); + virtual ~QuoteFillRatio(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + + web::json::value toJson() const override; + void fromJson(web::json::value& json) override; + + void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; + void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; + + ///////////////////////////////////////////// + /// QuoteFillRatio members + + /// + /// + /// + utility::datetime getDate() const; + void setDate(utility::datetime value); + /// + /// + /// + double getAccount() const; + bool accountIsSet() const; + void unsetAccount(); + void setAccount(double value); + /// + /// + /// + double getQuoteCount() const; + bool quoteCountIsSet() const; + void unsetQuoteCount(); + void setQuoteCount(double value); + /// + /// + /// + double getDealtCount() const; + bool dealtCountIsSet() const; + void unsetDealtCount(); + void setDealtCount(double value); + /// + /// + /// + double getQuotesMavg7() const; + bool quotesMavg7IsSet() const; + void unsetQuotesMavg7(); + void setQuotesMavg7(double value); + /// + /// + /// + double getDealtMavg7() const; + bool dealtMavg7IsSet() const; + void unsetDealtMavg7(); + void setDealtMavg7(double value); + /// + /// + /// + double getQuoteFillRatioMavg7() const; + bool quoteFillRatioMavg7IsSet() const; + void unsetQuoteFillRatioMavg7(); + void setQuoteFillRatioMavg7(double value); + +protected: + utility::datetime m_date; + double m_Account; + bool m_AccountIsSet; + double m_QuoteCount; + bool m_QuoteCountIsSet; + double m_DealtCount; + bool m_DealtCountIsSet; + double m_QuotesMavg7; + bool m_QuotesMavg7IsSet; + double m_DealtMavg7; + bool m_DealtMavg7IsSet; + double m_QuoteFillRatioMavg7; + bool m_QuoteFillRatioMavg7IsSet; +}; + +} +} +} +} + +#endif /* IO_SWAGGER_CLIENT_MODEL_QuoteFillRatio_H_ */ diff --git a/auto-generated/cpprest/model/Settlement.cpp b/auto-generated/cpprest/model/Settlement.cpp index 112b80549..77932f232 100644 --- a/auto-generated/cpprest/model/Settlement.cpp +++ b/auto-generated/cpprest/model/Settlement.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -93,31 +93,59 @@ void Settlement::fromJson(web::json::value& val) setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); if(val.has_field(utility::conversions::to_string_t("settlementType"))) { - setSettlementType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("settlementType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("settlementType")]; + if(!fieldValue.is_null()) + { + setSettlementType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("settledPrice"))) { - setSettledPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("settledPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("settledPrice")]; + if(!fieldValue.is_null()) + { + setSettledPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("optionStrikePrice"))) { - setOptionStrikePrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("optionStrikePrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("optionStrikePrice")]; + if(!fieldValue.is_null()) + { + setOptionStrikePrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("optionUnderlyingPrice"))) { - setOptionUnderlyingPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("optionUnderlyingPrice")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("optionUnderlyingPrice")]; + if(!fieldValue.is_null()) + { + setOptionUnderlyingPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("bankrupt"))) { - setBankrupt(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("bankrupt")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("bankrupt")]; + if(!fieldValue.is_null()) + { + setBankrupt(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("taxBase"))) { - setTaxBase(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("taxBase")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("taxBase")]; + if(!fieldValue.is_null()) + { + setTaxBase(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("taxRate"))) { - setTaxRate(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("taxRate")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("taxRate")]; + if(!fieldValue.is_null()) + { + setTaxRate(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Settlement.h b/auto-generated/cpprest/model/Settlement.h index 37e67fd48..9701fc197 100644 --- a/auto-generated/cpprest/model/Settlement.h +++ b/auto-generated/cpprest/model/Settlement.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Stats.cpp b/auto-generated/cpprest/model/Stats.cpp index b50c7a6ac..a4a13c164 100644 --- a/auto-generated/cpprest/model/Stats.cpp +++ b/auto-generated/cpprest/model/Stats.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -77,23 +77,43 @@ void Stats::fromJson(web::json::value& val) setRootSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("rootSymbol")])); if(val.has_field(utility::conversions::to_string_t("currency"))) { - setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currency")]; + if(!fieldValue.is_null()) + { + setCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("volume24h"))) { - setVolume24h(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("volume24h")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("volume24h")]; + if(!fieldValue.is_null()) + { + setVolume24h(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover24h"))) { - setTurnover24h(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover24h")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover24h")]; + if(!fieldValue.is_null()) + { + setTurnover24h(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openInterest"))) { - setOpenInterest(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openInterest")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openInterest")]; + if(!fieldValue.is_null()) + { + setOpenInterest(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("openValue"))) { - setOpenValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("openValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("openValue")]; + if(!fieldValue.is_null()) + { + setOpenValue(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Stats.h b/auto-generated/cpprest/model/Stats.h index bd1723938..721662753 100644 --- a/auto-generated/cpprest/model/Stats.h +++ b/auto-generated/cpprest/model/Stats.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/StatsHistory.cpp b/auto-generated/cpprest/model/StatsHistory.cpp index 251654a73..a2412f8ed 100644 --- a/auto-generated/cpprest/model/StatsHistory.cpp +++ b/auto-generated/cpprest/model/StatsHistory.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -69,15 +69,27 @@ void StatsHistory::fromJson(web::json::value& val) setRootSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("rootSymbol")])); if(val.has_field(utility::conversions::to_string_t("currency"))) { - setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currency")]; + if(!fieldValue.is_null()) + { + setCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("volume"))) { - setVolume(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("volume")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("volume")]; + if(!fieldValue.is_null()) + { + setVolume(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover"))) { - setTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover")]; + if(!fieldValue.is_null()) + { + setTurnover(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/StatsHistory.h b/auto-generated/cpprest/model/StatsHistory.h index 15f40d05d..d35663b14 100644 --- a/auto-generated/cpprest/model/StatsHistory.h +++ b/auto-generated/cpprest/model/StatsHistory.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/StatsUSD.cpp b/auto-generated/cpprest/model/StatsUSD.cpp index f6aeca7ec..f89dca948 100644 --- a/auto-generated/cpprest/model/StatsUSD.cpp +++ b/auto-generated/cpprest/model/StatsUSD.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -77,23 +77,43 @@ void StatsUSD::fromJson(web::json::value& val) setRootSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("rootSymbol")])); if(val.has_field(utility::conversions::to_string_t("currency"))) { - setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currency")]; + if(!fieldValue.is_null()) + { + setCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover24h"))) { - setTurnover24h(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover24h")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover24h")]; + if(!fieldValue.is_null()) + { + setTurnover24h(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover30d"))) { - setTurnover30d(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover30d")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover30d")]; + if(!fieldValue.is_null()) + { + setTurnover30d(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover365d"))) { - setTurnover365d(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover365d")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover365d")]; + if(!fieldValue.is_null()) + { + setTurnover365d(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover"))) { - setTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover")]; + if(!fieldValue.is_null()) + { + setTurnover(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/StatsUSD.h b/auto-generated/cpprest/model/StatsUSD.h index 8f6c1a039..09fad543c 100644 --- a/auto-generated/cpprest/model/StatsUSD.h +++ b/auto-generated/cpprest/model/StatsUSD.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Trade.cpp b/auto-generated/cpprest/model/Trade.cpp index 634b6b820..73550261a 100644 --- a/auto-generated/cpprest/model/Trade.cpp +++ b/auto-generated/cpprest/model/Trade.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -99,35 +99,67 @@ void Trade::fromJson(web::json::value& val) setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); if(val.has_field(utility::conversions::to_string_t("side"))) { - setSide(ModelBase::stringFromJson(val[utility::conversions::to_string_t("side")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("side")]; + if(!fieldValue.is_null()) + { + setSide(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("size"))) { - setSize(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("size")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("size")]; + if(!fieldValue.is_null()) + { + setSize(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("price"))) { - setPrice(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("price")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("price")]; + if(!fieldValue.is_null()) + { + setPrice(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("tickDirection"))) { - setTickDirection(ModelBase::stringFromJson(val[utility::conversions::to_string_t("tickDirection")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("tickDirection")]; + if(!fieldValue.is_null()) + { + setTickDirection(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("trdMatchID"))) { - setTrdMatchID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("trdMatchID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("trdMatchID")]; + if(!fieldValue.is_null()) + { + setTrdMatchID(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("grossValue"))) { - setGrossValue(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("grossValue")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("grossValue")]; + if(!fieldValue.is_null()) + { + setGrossValue(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("homeNotional"))) { - setHomeNotional(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("homeNotional")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("homeNotional")]; + if(!fieldValue.is_null()) + { + setHomeNotional(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("foreignNotional"))) { - setForeignNotional(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("foreignNotional")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("foreignNotional")]; + if(!fieldValue.is_null()) + { + setForeignNotional(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Trade.h b/auto-generated/cpprest/model/Trade.h index 6b09b070a..3349db305 100644 --- a/auto-generated/cpprest/model/Trade.h +++ b/auto-generated/cpprest/model/Trade.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/TradeBin.cpp b/auto-generated/cpprest/model/TradeBin.cpp index 2d1cbbeb4..2bdda6ca2 100644 --- a/auto-generated/cpprest/model/TradeBin.cpp +++ b/auto-generated/cpprest/model/TradeBin.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -117,47 +117,91 @@ void TradeBin::fromJson(web::json::value& val) setSymbol(ModelBase::stringFromJson(val[utility::conversions::to_string_t("symbol")])); if(val.has_field(utility::conversions::to_string_t("open"))) { - setOpen(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("open")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("open")]; + if(!fieldValue.is_null()) + { + setOpen(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("high"))) { - setHigh(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("high")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("high")]; + if(!fieldValue.is_null()) + { + setHigh(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("low"))) { - setLow(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("low")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("low")]; + if(!fieldValue.is_null()) + { + setLow(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("close"))) { - setClose(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("close")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("close")]; + if(!fieldValue.is_null()) + { + setClose(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("trades"))) { - setTrades(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("trades")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("trades")]; + if(!fieldValue.is_null()) + { + setTrades(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("volume"))) { - setVolume(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("volume")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("volume")]; + if(!fieldValue.is_null()) + { + setVolume(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("vwap"))) { - setVwap(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("vwap")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("vwap")]; + if(!fieldValue.is_null()) + { + setVwap(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastSize"))) { - setLastSize(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("lastSize")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastSize")]; + if(!fieldValue.is_null()) + { + setLastSize(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("turnover"))) { - setTurnover(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("turnover")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("turnover")]; + if(!fieldValue.is_null()) + { + setTurnover(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("homeNotional"))) { - setHomeNotional(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("homeNotional")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("homeNotional")]; + if(!fieldValue.is_null()) + { + setHomeNotional(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("foreignNotional"))) { - setForeignNotional(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("foreignNotional")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("foreignNotional")]; + if(!fieldValue.is_null()) + { + setForeignNotional(ModelBase::doubleFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/TradeBin.h b/auto-generated/cpprest/model/TradeBin.h index 3a13bf5ab..da1436483 100644 --- a/auto-generated/cpprest/model/TradeBin.h +++ b/auto-generated/cpprest/model/TradeBin.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/Transaction.cpp b/auto-generated/cpprest/model/Transaction.cpp index 6a634f991..6cb08d323 100644 --- a/auto-generated/cpprest/model/Transaction.cpp +++ b/auto-generated/cpprest/model/Transaction.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -113,47 +113,91 @@ void Transaction::fromJson(web::json::value& val) setTransactID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("transactID")])); if(val.has_field(utility::conversions::to_string_t("account"))) { - setAccount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("account")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("account")]; + if(!fieldValue.is_null()) + { + setAccount(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("currency"))) { - setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currency")]; + if(!fieldValue.is_null()) + { + setCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("transactType"))) { - setTransactType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("transactType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("transactType")]; + if(!fieldValue.is_null()) + { + setTransactType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("amount"))) { - setAmount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("amount")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("amount")]; + if(!fieldValue.is_null()) + { + setAmount(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("fee"))) { - setFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("fee")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("fee")]; + if(!fieldValue.is_null()) + { + setFee(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("transactStatus"))) { - setTransactStatus(ModelBase::stringFromJson(val[utility::conversions::to_string_t("transactStatus")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("transactStatus")]; + if(!fieldValue.is_null()) + { + setTransactStatus(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("address"))) { - setAddress(ModelBase::stringFromJson(val[utility::conversions::to_string_t("address")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("address")]; + if(!fieldValue.is_null()) + { + setAddress(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("tx"))) { - setTx(ModelBase::stringFromJson(val[utility::conversions::to_string_t("tx")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("tx")]; + if(!fieldValue.is_null()) + { + setTx(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("text"))) { - setText(ModelBase::stringFromJson(val[utility::conversions::to_string_t("text")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("text")]; + if(!fieldValue.is_null()) + { + setText(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("transactTime"))) { - setTransactTime(ModelBase::dateFromJson(val[utility::conversions::to_string_t("transactTime")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("transactTime")]; + if(!fieldValue.is_null()) + { + setTransactTime(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timestamp"))) { - setTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timestamp")]; + if(!fieldValue.is_null()) + { + setTimestamp(ModelBase::dateFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/Transaction.h b/auto-generated/cpprest/model/Transaction.h index 241c0ad93..92136a15a 100644 --- a/auto-generated/cpprest/model/Transaction.h +++ b/auto-generated/cpprest/model/Transaction.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/User.cpp b/auto-generated/cpprest/model/User.cpp index 579cd42ac..4894d9cec 100644 --- a/auto-generated/cpprest/model/User.cpp +++ b/auto-generated/cpprest/model/User.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -137,70 +137,127 @@ void User::fromJson(web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("id"))) { - setId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("id")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + if(!fieldValue.is_null()) + { + setId(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("ownerId"))) { - setOwnerId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("ownerId")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("ownerId")]; + if(!fieldValue.is_null()) + { + setOwnerId(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("firstname"))) { - setFirstname(ModelBase::stringFromJson(val[utility::conversions::to_string_t("firstname")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("firstname")]; + if(!fieldValue.is_null()) + { + setFirstname(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastname"))) { - setLastname(ModelBase::stringFromJson(val[utility::conversions::to_string_t("lastname")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastname")]; + if(!fieldValue.is_null()) + { + setLastname(ModelBase::stringFromJson(fieldValue)); + } } setUsername(ModelBase::stringFromJson(val[utility::conversions::to_string_t("username")])); setEmail(ModelBase::stringFromJson(val[utility::conversions::to_string_t("email")])); if(val.has_field(utility::conversions::to_string_t("phone"))) { - setPhone(ModelBase::stringFromJson(val[utility::conversions::to_string_t("phone")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("phone")]; + if(!fieldValue.is_null()) + { + setPhone(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("created"))) { - setCreated(ModelBase::dateFromJson(val[utility::conversions::to_string_t("created")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("created")]; + if(!fieldValue.is_null()) + { + setCreated(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("lastUpdated"))) { - setLastUpdated(ModelBase::dateFromJson(val[utility::conversions::to_string_t("lastUpdated")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("lastUpdated")]; + if(!fieldValue.is_null()) + { + setLastUpdated(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("preferences"))) { - if(!val[utility::conversions::to_string_t("preferences")].is_null()) + web::json::value& fieldValue = val[utility::conversions::to_string_t("preferences")]; + if(!fieldValue.is_null()) { std::shared_ptr newItem(new UserPreferences()); - newItem->fromJson(val[utility::conversions::to_string_t("preferences")]); + newItem->fromJson(fieldValue); setPreferences( newItem ); } } if(val.has_field(utility::conversions::to_string_t("TFAEnabled"))) { - setTFAEnabled(ModelBase::stringFromJson(val[utility::conversions::to_string_t("TFAEnabled")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("TFAEnabled")]; + if(!fieldValue.is_null()) + { + setTFAEnabled(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("affiliateID"))) { - setAffiliateID(ModelBase::stringFromJson(val[utility::conversions::to_string_t("affiliateID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("affiliateID")]; + if(!fieldValue.is_null()) + { + setAffiliateID(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pgpPubKey"))) { - setPgpPubKey(ModelBase::stringFromJson(val[utility::conversions::to_string_t("pgpPubKey")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pgpPubKey")]; + if(!fieldValue.is_null()) + { + setPgpPubKey(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("country"))) { - setCountry(ModelBase::stringFromJson(val[utility::conversions::to_string_t("country")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("country")]; + if(!fieldValue.is_null()) + { + setCountry(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("geoipCountry"))) { - setGeoipCountry(ModelBase::stringFromJson(val[utility::conversions::to_string_t("geoipCountry")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("geoipCountry")]; + if(!fieldValue.is_null()) + { + setGeoipCountry(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("geoipRegion"))) { - setGeoipRegion(ModelBase::stringFromJson(val[utility::conversions::to_string_t("geoipRegion")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("geoipRegion")]; + if(!fieldValue.is_null()) + { + setGeoipRegion(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("typ"))) { - setTyp(ModelBase::stringFromJson(val[utility::conversions::to_string_t("typ")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("typ")]; + if(!fieldValue.is_null()) + { + setTyp(ModelBase::stringFromJson(fieldValue)); + } } } diff --git a/auto-generated/cpprest/model/User.h b/auto-generated/cpprest/model/User.h index 8564101e4..61fad07f8 100644 --- a/auto-generated/cpprest/model/User.h +++ b/auto-generated/cpprest/model/User.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/UserCommission.cpp b/auto-generated/cpprest/model/UserCommission.cpp deleted file mode 100644 index cf5c567ba..000000000 --- a/auto-generated/cpprest/model/UserCommission.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - - -#include "UserCommission.h" - -namespace io { -namespace swagger { -namespace client { -namespace model { - -UserCommission::UserCommission() -{ - m_MakerFee = 0.0; - m_MakerFeeIsSet = false; - m_TakerFee = 0.0; - m_TakerFeeIsSet = false; - m_SettlementFee = 0.0; - m_SettlementFeeIsSet = false; - m_MaxFee = 0.0; - m_MaxFeeIsSet = false; -} - -UserCommission::~UserCommission() -{ -} - -void UserCommission::validate() -{ - // TODO: implement validation -} - -web::json::value UserCommission::toJson() const -{ - web::json::value val = web::json::value::object(); - - if(m_MakerFeeIsSet) - { - val[utility::conversions::to_string_t("makerFee")] = ModelBase::toJson(m_MakerFee); - } - if(m_TakerFeeIsSet) - { - val[utility::conversions::to_string_t("takerFee")] = ModelBase::toJson(m_TakerFee); - } - if(m_SettlementFeeIsSet) - { - val[utility::conversions::to_string_t("settlementFee")] = ModelBase::toJson(m_SettlementFee); - } - if(m_MaxFeeIsSet) - { - val[utility::conversions::to_string_t("maxFee")] = ModelBase::toJson(m_MaxFee); - } - - return val; -} - -void UserCommission::fromJson(web::json::value& val) -{ - if(val.has_field(utility::conversions::to_string_t("makerFee"))) - { - setMakerFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("makerFee")])); - } - if(val.has_field(utility::conversions::to_string_t("takerFee"))) - { - setTakerFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("takerFee")])); - } - if(val.has_field(utility::conversions::to_string_t("settlementFee"))) - { - setSettlementFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("settlementFee")])); - } - if(val.has_field(utility::conversions::to_string_t("maxFee"))) - { - setMaxFee(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("maxFee")])); - } -} - -void UserCommission::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) - { - namePrefix += utility::conversions::to_string_t("."); - } - - if(m_MakerFeeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("makerFee"), m_MakerFee)); - } - if(m_TakerFeeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("takerFee"), m_TakerFee)); - } - if(m_SettlementFeeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("settlementFee"), m_SettlementFee)); - } - if(m_MaxFeeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("maxFee"), m_MaxFee)); - } -} - -void UserCommission::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) - { - namePrefix += utility::conversions::to_string_t("."); - } - - if(multipart->hasContent(utility::conversions::to_string_t("makerFee"))) - { - setMakerFee(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("makerFee")))); - } - if(multipart->hasContent(utility::conversions::to_string_t("takerFee"))) - { - setTakerFee(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("takerFee")))); - } - if(multipart->hasContent(utility::conversions::to_string_t("settlementFee"))) - { - setSettlementFee(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("settlementFee")))); - } - if(multipart->hasContent(utility::conversions::to_string_t("maxFee"))) - { - setMaxFee(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("maxFee")))); - } -} - -double UserCommission::getMakerFee() const -{ - return m_MakerFee; -} - - -void UserCommission::setMakerFee(double value) -{ - m_MakerFee = value; - m_MakerFeeIsSet = true; -} -bool UserCommission::makerFeeIsSet() const -{ - return m_MakerFeeIsSet; -} - -void UserCommission::unsetMakerFee() -{ - m_MakerFeeIsSet = false; -} - -double UserCommission::getTakerFee() const -{ - return m_TakerFee; -} - - -void UserCommission::setTakerFee(double value) -{ - m_TakerFee = value; - m_TakerFeeIsSet = true; -} -bool UserCommission::takerFeeIsSet() const -{ - return m_TakerFeeIsSet; -} - -void UserCommission::unsetTakerFee() -{ - m_TakerFeeIsSet = false; -} - -double UserCommission::getSettlementFee() const -{ - return m_SettlementFee; -} - - -void UserCommission::setSettlementFee(double value) -{ - m_SettlementFee = value; - m_SettlementFeeIsSet = true; -} -bool UserCommission::settlementFeeIsSet() const -{ - return m_SettlementFeeIsSet; -} - -void UserCommission::unsetSettlementFee() -{ - m_SettlementFeeIsSet = false; -} - -double UserCommission::getMaxFee() const -{ - return m_MaxFee; -} - - -void UserCommission::setMaxFee(double value) -{ - m_MaxFee = value; - m_MaxFeeIsSet = true; -} -bool UserCommission::maxFeeIsSet() const -{ - return m_MaxFeeIsSet; -} - -void UserCommission::unsetMaxFee() -{ - m_MaxFeeIsSet = false; -} - -} -} -} -} - diff --git a/auto-generated/cpprest/model/UserCommission.h b/auto-generated/cpprest/model/UserCommission.h deleted file mode 100644 index f5549a6b5..000000000 --- a/auto-generated/cpprest/model/UserCommission.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -/* - * UserCommission.h - * - * - */ - -#ifndef IO_SWAGGER_CLIENT_MODEL_UserCommission_H_ -#define IO_SWAGGER_CLIENT_MODEL_UserCommission_H_ - - -#include "../ModelBase.h" - - -namespace io { -namespace swagger { -namespace client { -namespace model { - -/// -/// -/// -class UserCommission - : public ModelBase -{ -public: - UserCommission(); - virtual ~UserCommission(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - void fromJson(web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - ///////////////////////////////////////////// - /// UserCommission members - - /// - /// - /// - double getMakerFee() const; - bool makerFeeIsSet() const; - void unsetMakerFee(); - void setMakerFee(double value); - /// - /// - /// - double getTakerFee() const; - bool takerFeeIsSet() const; - void unsetTakerFee(); - void setTakerFee(double value); - /// - /// - /// - double getSettlementFee() const; - bool settlementFeeIsSet() const; - void unsetSettlementFee(); - void setSettlementFee(double value); - /// - /// - /// - double getMaxFee() const; - bool maxFeeIsSet() const; - void unsetMaxFee(); - void setMaxFee(double value); - -protected: - double m_MakerFee; - bool m_MakerFeeIsSet; - double m_TakerFee; - bool m_TakerFeeIsSet; - double m_SettlementFee; - bool m_SettlementFeeIsSet; - double m_MaxFee; - bool m_MaxFeeIsSet; -}; - -} -} -} -} - -#endif /* IO_SWAGGER_CLIENT_MODEL_UserCommission_H_ */ diff --git a/auto-generated/cpprest/model/UserCommissionsBySymbol.cpp b/auto-generated/cpprest/model/UserCommissionsBySymbol.cpp new file mode 100644 index 000000000..6574d430b --- /dev/null +++ b/auto-generated/cpprest/model/UserCommissionsBySymbol.cpp @@ -0,0 +1,71 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + + +#include "UserCommissionsBySymbol.h" + +namespace io { +namespace swagger { +namespace client { +namespace model { + +UserCommissionsBySymbol::UserCommissionsBySymbol() +{ +} + +UserCommissionsBySymbol::~UserCommissionsBySymbol() +{ +} + +void UserCommissionsBySymbol::validate() +{ + // TODO: implement validation +} + +web::json::value UserCommissionsBySymbol::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} + +void UserCommissionsBySymbol::fromJson(web::json::value& val) +{ +} + +void UserCommissionsBySymbol::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) + { + namePrefix += utility::conversions::to_string_t("."); + } + +} + +void UserCommissionsBySymbol::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) + { + namePrefix += utility::conversions::to_string_t("."); + } + +} + +} +} +} +} + diff --git a/auto-generated/cpprest/model/UserCommissionsBySymbol.h b/auto-generated/cpprest/model/UserCommissionsBySymbol.h new file mode 100644 index 000000000..5049a1d11 --- /dev/null +++ b/auto-generated/cpprest/model/UserCommissionsBySymbol.h @@ -0,0 +1,64 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * UserCommissionsBySymbol.h + * + * + */ + +#ifndef IO_SWAGGER_CLIENT_MODEL_UserCommissionsBySymbol_H_ +#define IO_SWAGGER_CLIENT_MODEL_UserCommissionsBySymbol_H_ + + +#include "../ModelBase.h" + + +namespace io { +namespace swagger { +namespace client { +namespace model { + +/// +/// +/// +class UserCommissionsBySymbol + : public ModelBase +{ +public: + UserCommissionsBySymbol(); + virtual ~UserCommissionsBySymbol(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + + web::json::value toJson() const override; + void fromJson(web::json::value& json) override; + + void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; + void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; + + ///////////////////////////////////////////// + /// UserCommissionsBySymbol members + + +protected: +}; + +} +} +} +} + +#endif /* IO_SWAGGER_CLIENT_MODEL_UserCommissionsBySymbol_H_ */ diff --git a/auto-generated/cpprest/model/UserEvent.cpp b/auto-generated/cpprest/model/UserEvent.cpp new file mode 100644 index 000000000..b3530b865 --- /dev/null +++ b/auto-generated/cpprest/model/UserEvent.cpp @@ -0,0 +1,424 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + + +#include "UserEvent.h" + +namespace io { +namespace swagger { +namespace client { +namespace model { + +UserEvent::UserEvent() +{ + m_Id = 0.0; + m_IdIsSet = false; + m_Type = utility::conversions::to_string_t(""); + m_Status = utility::conversions::to_string_t(""); + m_UserId = 0.0; + m_CreatedById = 0.0; + m_Ip = utility::conversions::to_string_t(""); + m_IpIsSet = false; + m_GeoipCountry = utility::conversions::to_string_t(""); + m_GeoipCountryIsSet = false; + m_GeoipRegion = utility::conversions::to_string_t(""); + m_GeoipRegionIsSet = false; + m_GeoipSubRegion = utility::conversions::to_string_t(""); + m_GeoipSubRegionIsSet = false; + m_EventMetaIsSet = false; + m_Created = utility::datetime(); +} + +UserEvent::~UserEvent() +{ +} + +void UserEvent::validate() +{ + // TODO: implement validation +} + +web::json::value UserEvent::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(m_IdIsSet) + { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(m_Id); + } + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(m_Type); + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(m_Status); + val[utility::conversions::to_string_t("userId")] = ModelBase::toJson(m_UserId); + val[utility::conversions::to_string_t("createdById")] = ModelBase::toJson(m_CreatedById); + if(m_IpIsSet) + { + val[utility::conversions::to_string_t("ip")] = ModelBase::toJson(m_Ip); + } + if(m_GeoipCountryIsSet) + { + val[utility::conversions::to_string_t("geoipCountry")] = ModelBase::toJson(m_GeoipCountry); + } + if(m_GeoipRegionIsSet) + { + val[utility::conversions::to_string_t("geoipRegion")] = ModelBase::toJson(m_GeoipRegion); + } + if(m_GeoipSubRegionIsSet) + { + val[utility::conversions::to_string_t("geoipSubRegion")] = ModelBase::toJson(m_GeoipSubRegion); + } + if(m_EventMetaIsSet) + { + val[utility::conversions::to_string_t("eventMeta")] = ModelBase::toJson(m_EventMeta); + } + val[utility::conversions::to_string_t("created")] = ModelBase::toJson(m_Created); + + return val; +} + +void UserEvent::fromJson(web::json::value& val) +{ + if(val.has_field(utility::conversions::to_string_t("id"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("id")]; + if(!fieldValue.is_null()) + { + setId(ModelBase::doubleFromJson(fieldValue)); + } + } + setType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("type")])); + setStatus(ModelBase::stringFromJson(val[utility::conversions::to_string_t("status")])); + setUserId(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("userId")])); + setCreatedById(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("createdById")])); + if(val.has_field(utility::conversions::to_string_t("ip"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("ip")]; + if(!fieldValue.is_null()) + { + setIp(ModelBase::stringFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("geoipCountry"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("geoipCountry")]; + if(!fieldValue.is_null()) + { + setGeoipCountry(ModelBase::stringFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("geoipRegion"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("geoipRegion")]; + if(!fieldValue.is_null()) + { + setGeoipRegion(ModelBase::stringFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("geoipSubRegion"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("geoipSubRegion")]; + if(!fieldValue.is_null()) + { + setGeoipSubRegion(ModelBase::stringFromJson(fieldValue)); + } + } + if(val.has_field(utility::conversions::to_string_t("eventMeta"))) + { + web::json::value& fieldValue = val[utility::conversions::to_string_t("eventMeta")]; + if(!fieldValue.is_null()) + { + std::shared_ptr newItem(nullptr); + newItem->fromJson(fieldValue); + setEventMeta( newItem ); + } + } + setCreated + (ModelBase::dateFromJson(val[utility::conversions::to_string_t("created")])); +} + +void UserEvent::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) + { + namePrefix += utility::conversions::to_string_t("."); + } + + if(m_IdIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("id"), m_Id)); + } + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("type"), m_Type)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("status"), m_Status)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("userId"), m_UserId)); + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("createdById"), m_CreatedById)); + if(m_IpIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("ip"), m_Ip)); + + } + if(m_GeoipCountryIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("geoipCountry"), m_GeoipCountry)); + + } + if(m_GeoipRegionIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("geoipRegion"), m_GeoipRegion)); + + } + if(m_GeoipSubRegionIsSet) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("geoipSubRegion"), m_GeoipSubRegion)); + + } + if(m_EventMetaIsSet) + { + if (m_EventMeta.get()) + { + m_EventMeta->toMultipart(multipart, utility::conversions::to_string_t("eventMeta.")); + } + + } + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("created"), m_Created)); +} + +void UserEvent::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) +{ + utility::string_t namePrefix = prefix; + if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(".")) + { + namePrefix += utility::conversions::to_string_t("."); + } + + if(multipart->hasContent(utility::conversions::to_string_t("id"))) + { + setId(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("id")))); + } + setType(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("type")))); + setStatus(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("status")))); + setUserId(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("userId")))); + setCreatedById(ModelBase::doubleFromHttpContent(multipart->getContent(utility::conversions::to_string_t("createdById")))); + if(multipart->hasContent(utility::conversions::to_string_t("ip"))) + { + setIp(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("ip")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("geoipCountry"))) + { + setGeoipCountry(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("geoipCountry")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("geoipRegion"))) + { + setGeoipRegion(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("geoipRegion")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("geoipSubRegion"))) + { + setGeoipSubRegion(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("geoipSubRegion")))); + } + if(multipart->hasContent(utility::conversions::to_string_t("eventMeta"))) + { + if(multipart->hasContent(utility::conversions::to_string_t("eventMeta"))) + { + std::shared_ptr newItem(nullptr); + newItem->fromMultiPart(multipart, utility::conversions::to_string_t("eventMeta.")); + setEventMeta( newItem ); + } + } + setCreated(ModelBase::dateFromHttpContent(multipart->getContent(utility::conversions::to_string_t("created")))); +} + +double UserEvent::getId() const +{ + return m_Id; +} + + +void UserEvent::setId(double value) +{ + m_Id = value; + m_IdIsSet = true; +} +bool UserEvent::idIsSet() const +{ + return m_IdIsSet; +} + +void UserEvent::unsetId() +{ + m_IdIsSet = false; +} + +utility::string_t UserEvent::getType() const +{ + return m_Type; +} + + +void UserEvent::setType(utility::string_t value) +{ + m_Type = value; + +} +utility::string_t UserEvent::getStatus() const +{ + return m_Status; +} + + +void UserEvent::setStatus(utility::string_t value) +{ + m_Status = value; + +} +double UserEvent::getUserId() const +{ + return m_UserId; +} + + +void UserEvent::setUserId(double value) +{ + m_UserId = value; + +} +double UserEvent::getCreatedById() const +{ + return m_CreatedById; +} + + +void UserEvent::setCreatedById(double value) +{ + m_CreatedById = value; + +} +utility::string_t UserEvent::getIp() const +{ + return m_Ip; +} + + +void UserEvent::setIp(utility::string_t value) +{ + m_Ip = value; + m_IpIsSet = true; +} +bool UserEvent::ipIsSet() const +{ + return m_IpIsSet; +} + +void UserEvent::unsetIp() +{ + m_IpIsSet = false; +} + +utility::string_t UserEvent::getGeoipCountry() const +{ + return m_GeoipCountry; +} + + +void UserEvent::setGeoipCountry(utility::string_t value) +{ + m_GeoipCountry = value; + m_GeoipCountryIsSet = true; +} +bool UserEvent::geoipCountryIsSet() const +{ + return m_GeoipCountryIsSet; +} + +void UserEvent::unsetGeoipCountry() +{ + m_GeoipCountryIsSet = false; +} + +utility::string_t UserEvent::getGeoipRegion() const +{ + return m_GeoipRegion; +} + + +void UserEvent::setGeoipRegion(utility::string_t value) +{ + m_GeoipRegion = value; + m_GeoipRegionIsSet = true; +} +bool UserEvent::geoipRegionIsSet() const +{ + return m_GeoipRegionIsSet; +} + +void UserEvent::unsetGeoipRegion() +{ + m_GeoipRegionIsSet = false; +} + +utility::string_t UserEvent::getGeoipSubRegion() const +{ + return m_GeoipSubRegion; +} + + +void UserEvent::setGeoipSubRegion(utility::string_t value) +{ + m_GeoipSubRegion = value; + m_GeoipSubRegionIsSet = true; +} +bool UserEvent::geoipSubRegionIsSet() const +{ + return m_GeoipSubRegionIsSet; +} + +void UserEvent::unsetGeoipSubRegion() +{ + m_GeoipSubRegionIsSet = false; +} + +std::shared_ptr UserEvent::getEventMeta() const +{ + return m_EventMeta; +} + + +void UserEvent::setEventMeta(std::shared_ptr value) +{ + m_EventMeta = value; + m_EventMetaIsSet = true; +} +bool UserEvent::eventMetaIsSet() const +{ + return m_EventMetaIsSet; +} + +void UserEvent::unsetEventMeta() +{ + m_EventMetaIsSet = false; +} + +utility::datetime UserEvent::getCreated() const +{ + return m_Created; +} + + +void UserEvent::setCreated(utility::datetime value) +{ + m_Created = value; + +} +} +} +} +} + diff --git a/auto-generated/cpprest/model/UserEvent.h b/auto-generated/cpprest/model/UserEvent.h new file mode 100644 index 000000000..d6b51f500 --- /dev/null +++ b/auto-generated/cpprest/model/UserEvent.h @@ -0,0 +1,150 @@ +/** + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * UserEvent.h + * + * User Events for auditing + */ + +#ifndef IO_SWAGGER_CLIENT_MODEL_UserEvent_H_ +#define IO_SWAGGER_CLIENT_MODEL_UserEvent_H_ + + +#include "../ModelBase.h" + +#include +#include "Object.h" + +namespace io { +namespace swagger { +namespace client { +namespace model { + +/// +/// User Events for auditing +/// +class UserEvent + : public ModelBase +{ +public: + UserEvent(); + virtual ~UserEvent(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + + web::json::value toJson() const override; + void fromJson(web::json::value& json) override; + + void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; + void fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; + + ///////////////////////////////////////////// + /// UserEvent members + + /// + /// + /// + double getId() const; + bool idIsSet() const; + void unsetId(); + void setId(double value); + /// + /// + /// + utility::string_t getType() const; + void setType(utility::string_t value); + /// + /// + /// + utility::string_t getStatus() const; + void setStatus(utility::string_t value); + /// + /// + /// + double getUserId() const; + void setUserId(double value); + /// + /// + /// + double getCreatedById() const; + void setCreatedById(double value); + /// + /// + /// + utility::string_t getIp() const; + bool ipIsSet() const; + void unsetIp(); + void setIp(utility::string_t value); + /// + /// + /// + utility::string_t getGeoipCountry() const; + bool geoipCountryIsSet() const; + void unsetGeoipCountry(); + void setGeoipCountry(utility::string_t value); + /// + /// + /// + utility::string_t getGeoipRegion() const; + bool geoipRegionIsSet() const; + void unsetGeoipRegion(); + void setGeoipRegion(utility::string_t value); + /// + /// + /// + utility::string_t getGeoipSubRegion() const; + bool geoipSubRegionIsSet() const; + void unsetGeoipSubRegion(); + void setGeoipSubRegion(utility::string_t value); + /// + /// + /// + std::shared_ptr getEventMeta() const; + bool eventMetaIsSet() const; + void unsetEventMeta(); + void setEventMeta(std::shared_ptr value); + /// + /// + /// + utility::datetime getCreated() const; + void setCreated(utility::datetime value); + +protected: + double m_Id; + bool m_IdIsSet; + utility::string_t m_Type; + utility::string_t m_Status; + double m_UserId; + double m_CreatedById; + utility::string_t m_Ip; + bool m_IpIsSet; + utility::string_t m_GeoipCountry; + bool m_GeoipCountryIsSet; + utility::string_t m_GeoipRegion; + bool m_GeoipRegionIsSet; + utility::string_t m_GeoipSubRegion; + bool m_GeoipSubRegionIsSet; + std::shared_ptr m_EventMeta; + bool m_EventMetaIsSet; + utility::datetime m_Created; + }; + +} +} +} +} + +#endif /* IO_SWAGGER_CLIENT_MODEL_UserEvent_H_ */ diff --git a/auto-generated/cpprest/model/UserPreferences.cpp b/auto-generated/cpprest/model/UserPreferences.cpp index b6315a628..394b5e601 100644 --- a/auto-generated/cpprest/model/UserPreferences.cpp +++ b/auto-generated/cpprest/model/UserPreferences.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -36,6 +36,7 @@ UserPreferences::UserPreferences() m_Debug = false; m_DebugIsSet = false; m_DisableEmailsIsSet = false; + m_DisablePushIsSet = false; m_HideConfirmDialogsIsSet = false; m_HideConnectionModal = false; m_HideConnectionModalIsSet = false; @@ -121,6 +122,17 @@ web::json::value UserPreferences::toJson() const val[utility::conversions::to_string_t("disableEmails")] = web::json::value::array(jsonArray); } } + { + std::vector jsonArray; + for( auto& item : m_DisablePush ) + { + jsonArray.push_back(ModelBase::toJson(item)); + } + if(jsonArray.size() > 0) + { + val[utility::conversions::to_string_t("disablePush")] = web::json::value::array(jsonArray); + } + } { std::vector jsonArray; for( auto& item : m_HideConfirmDialogs ) @@ -229,31 +241,59 @@ void UserPreferences::fromJson(web::json::value& val) { if(val.has_field(utility::conversions::to_string_t("alertOnLiquidations"))) { - setAlertOnLiquidations(ModelBase::boolFromJson(val[utility::conversions::to_string_t("alertOnLiquidations")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("alertOnLiquidations")]; + if(!fieldValue.is_null()) + { + setAlertOnLiquidations(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("animationsEnabled"))) { - setAnimationsEnabled(ModelBase::boolFromJson(val[utility::conversions::to_string_t("animationsEnabled")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("animationsEnabled")]; + if(!fieldValue.is_null()) + { + setAnimationsEnabled(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("announcementsLastSeen"))) { - setAnnouncementsLastSeen(ModelBase::dateFromJson(val[utility::conversions::to_string_t("announcementsLastSeen")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("announcementsLastSeen")]; + if(!fieldValue.is_null()) + { + setAnnouncementsLastSeen(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("chatChannelID"))) { - setChatChannelID(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("chatChannelID")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("chatChannelID")]; + if(!fieldValue.is_null()) + { + setChatChannelID(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("colorTheme"))) { - setColorTheme(ModelBase::stringFromJson(val[utility::conversions::to_string_t("colorTheme")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("colorTheme")]; + if(!fieldValue.is_null()) + { + setColorTheme(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("currency"))) { - setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("currency")]; + if(!fieldValue.is_null()) + { + setCurrency(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("debug"))) { - setDebug(ModelBase::boolFromJson(val[utility::conversions::to_string_t("debug")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("debug")]; + if(!fieldValue.is_null()) + { + setDebug(ModelBase::boolFromJson(fieldValue)); + } } { m_DisableEmails.clear(); @@ -266,6 +306,17 @@ void UserPreferences::fromJson(web::json::value& val) } } } + { + m_DisablePush.clear(); + std::vector jsonArray; + if(val.has_field(utility::conversions::to_string_t("disablePush"))) + { + for( auto& item : val[utility::conversions::to_string_t("disablePush")].as_array() ) + { + m_DisablePush.push_back(ModelBase::stringFromJson(item)); + } + } + } { m_HideConfirmDialogs.clear(); std::vector jsonArray; @@ -279,15 +330,27 @@ void UserPreferences::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("hideConnectionModal"))) { - setHideConnectionModal(ModelBase::boolFromJson(val[utility::conversions::to_string_t("hideConnectionModal")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("hideConnectionModal")]; + if(!fieldValue.is_null()) + { + setHideConnectionModal(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("hideFromLeaderboard"))) { - setHideFromLeaderboard(ModelBase::boolFromJson(val[utility::conversions::to_string_t("hideFromLeaderboard")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("hideFromLeaderboard")]; + if(!fieldValue.is_null()) + { + setHideFromLeaderboard(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("hideNameFromLeaderboard"))) { - setHideNameFromLeaderboard(ModelBase::boolFromJson(val[utility::conversions::to_string_t("hideNameFromLeaderboard")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("hideNameFromLeaderboard")]; + if(!fieldValue.is_null()) + { + setHideNameFromLeaderboard(ModelBase::boolFromJson(fieldValue)); + } } { m_HideNotifications.clear(); @@ -302,7 +365,11 @@ void UserPreferences::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("locale"))) { - setLocale(ModelBase::stringFromJson(val[utility::conversions::to_string_t("locale")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("locale")]; + if(!fieldValue.is_null()) + { + setLocale(ModelBase::stringFromJson(fieldValue)); + } } { m_MsgsSeen.clear(); @@ -317,28 +384,45 @@ void UserPreferences::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("orderBookBinning"))) { - if(!val[utility::conversions::to_string_t("orderBookBinning")].is_null()) + web::json::value& fieldValue = val[utility::conversions::to_string_t("orderBookBinning")]; + if(!fieldValue.is_null()) { std::shared_ptr newItem(nullptr); - newItem->fromJson(val[utility::conversions::to_string_t("orderBookBinning")]); + newItem->fromJson(fieldValue); setOrderBookBinning( newItem ); } } if(val.has_field(utility::conversions::to_string_t("orderBookType"))) { - setOrderBookType(ModelBase::stringFromJson(val[utility::conversions::to_string_t("orderBookType")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("orderBookType")]; + if(!fieldValue.is_null()) + { + setOrderBookType(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("orderClearImmediate"))) { - setOrderClearImmediate(ModelBase::boolFromJson(val[utility::conversions::to_string_t("orderClearImmediate")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("orderClearImmediate")]; + if(!fieldValue.is_null()) + { + setOrderClearImmediate(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("orderControlsPlusMinus"))) { - setOrderControlsPlusMinus(ModelBase::boolFromJson(val[utility::conversions::to_string_t("orderControlsPlusMinus")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("orderControlsPlusMinus")]; + if(!fieldValue.is_null()) + { + setOrderControlsPlusMinus(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("showLocaleNumbers"))) { - setShowLocaleNumbers(ModelBase::boolFromJson(val[utility::conversions::to_string_t("showLocaleNumbers")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("showLocaleNumbers")]; + if(!fieldValue.is_null()) + { + setShowLocaleNumbers(ModelBase::boolFromJson(fieldValue)); + } } { m_Sounds.clear(); @@ -353,23 +437,43 @@ void UserPreferences::fromJson(web::json::value& val) } if(val.has_field(utility::conversions::to_string_t("strictIPCheck"))) { - setStrictIPCheck(ModelBase::boolFromJson(val[utility::conversions::to_string_t("strictIPCheck")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("strictIPCheck")]; + if(!fieldValue.is_null()) + { + setStrictIPCheck(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("strictTimeout"))) { - setStrictTimeout(ModelBase::boolFromJson(val[utility::conversions::to_string_t("strictTimeout")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("strictTimeout")]; + if(!fieldValue.is_null()) + { + setStrictTimeout(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("tickerGroup"))) { - setTickerGroup(ModelBase::stringFromJson(val[utility::conversions::to_string_t("tickerGroup")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("tickerGroup")]; + if(!fieldValue.is_null()) + { + setTickerGroup(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("tickerPinned"))) { - setTickerPinned(ModelBase::boolFromJson(val[utility::conversions::to_string_t("tickerPinned")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("tickerPinned")]; + if(!fieldValue.is_null()) + { + setTickerPinned(ModelBase::boolFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("tradeLayout"))) { - setTradeLayout(ModelBase::stringFromJson(val[utility::conversions::to_string_t("tradeLayout")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("tradeLayout")]; + if(!fieldValue.is_null()) + { + setTradeLayout(ModelBase::stringFromJson(fieldValue)); + } } } @@ -424,6 +528,18 @@ void UserPreferences::toMultipart(std::shared_ptr multipart, multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("disableEmails"), web::json::value::array(jsonArray), utility::conversions::to_string_t("application/json"))); } } + { + std::vector jsonArray; + for( auto& item : m_DisablePush ) + { + jsonArray.push_back(ModelBase::toJson(item)); + } + + if(jsonArray.size() > 0) + { + multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("disablePush"), web::json::value::array(jsonArray), utility::conversions::to_string_t("application/json"))); + } + } { std::vector jsonArray; for( auto& item : m_HideConfirmDialogs ) @@ -586,6 +702,18 @@ void UserPreferences::fromMultiPart(std::shared_ptr multipart } } } + { + m_DisablePush.clear(); + if(multipart->hasContent(utility::conversions::to_string_t("disablePush"))) + { + + web::json::value jsonArray = web::json::value::parse(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("disablePush")))); + for( auto& item : jsonArray.as_array() ) + { + m_DisablePush.push_back(ModelBase::stringFromJson(item)); + } + } + } { m_HideConfirmDialogs.clear(); if(multipart->hasContent(utility::conversions::to_string_t("hideConfirmDialogs"))) @@ -864,6 +992,26 @@ void UserPreferences::unsetDisableEmails() m_DisableEmailsIsSet = false; } +std::vector& UserPreferences::getDisablePush() +{ + return m_DisablePush; +} + +void UserPreferences::setDisablePush(std::vector value) +{ + m_DisablePush = value; + m_DisablePushIsSet = true; +} +bool UserPreferences::disablePushIsSet() const +{ + return m_DisablePushIsSet; +} + +void UserPreferences::unsetDisablePush() +{ + m_DisablePushIsSet = false; +} + std::vector& UserPreferences::getHideConfirmDialogs() { return m_HideConfirmDialogs; diff --git a/auto-generated/cpprest/model/UserPreferences.h b/auto-generated/cpprest/model/UserPreferences.h index be1bdf116..6a9c0b541 100644 --- a/auto-generated/cpprest/model/UserPreferences.h +++ b/auto-generated/cpprest/model/UserPreferences.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -114,6 +114,13 @@ class UserPreferences /// /// /// + std::vector& getDisablePush(); + bool disablePushIsSet() const; + void unsetDisablePush(); + void setDisablePush(std::vector value); + /// + /// + /// std::vector& getHideConfirmDialogs(); bool hideConfirmDialogsIsSet() const; void unsetHideConfirmDialogs(); @@ -255,6 +262,8 @@ class UserPreferences bool m_DebugIsSet; std::vector m_DisableEmails; bool m_DisableEmailsIsSet; + std::vector m_DisablePush; + bool m_DisablePushIsSet; std::vector m_HideConfirmDialogs; bool m_HideConfirmDialogsIsSet; bool m_HideConnectionModal; diff --git a/auto-generated/cpprest/model/Wallet.cpp b/auto-generated/cpprest/model/Wallet.cpp index e8b631a21..6bf53f51a 100644 --- a/auto-generated/cpprest/model/Wallet.cpp +++ b/auto-generated/cpprest/model/Wallet.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ @@ -194,91 +194,179 @@ void Wallet::fromJson(web::json::value& val) setCurrency(ModelBase::stringFromJson(val[utility::conversions::to_string_t("currency")])); if(val.has_field(utility::conversions::to_string_t("prevDeposited"))) { - setPrevDeposited(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevDeposited")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevDeposited")]; + if(!fieldValue.is_null()) + { + setPrevDeposited(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevWithdrawn"))) { - setPrevWithdrawn(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevWithdrawn")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevWithdrawn")]; + if(!fieldValue.is_null()) + { + setPrevWithdrawn(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevTransferIn"))) { - setPrevTransferIn(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevTransferIn")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevTransferIn")]; + if(!fieldValue.is_null()) + { + setPrevTransferIn(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevTransferOut"))) { - setPrevTransferOut(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevTransferOut")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevTransferOut")]; + if(!fieldValue.is_null()) + { + setPrevTransferOut(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevAmount"))) { - setPrevAmount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("prevAmount")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevAmount")]; + if(!fieldValue.is_null()) + { + setPrevAmount(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("prevTimestamp"))) { - setPrevTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("prevTimestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("prevTimestamp")]; + if(!fieldValue.is_null()) + { + setPrevTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("deltaDeposited"))) { - setDeltaDeposited(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("deltaDeposited")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("deltaDeposited")]; + if(!fieldValue.is_null()) + { + setDeltaDeposited(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("deltaWithdrawn"))) { - setDeltaWithdrawn(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("deltaWithdrawn")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("deltaWithdrawn")]; + if(!fieldValue.is_null()) + { + setDeltaWithdrawn(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("deltaTransferIn"))) { - setDeltaTransferIn(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("deltaTransferIn")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("deltaTransferIn")]; + if(!fieldValue.is_null()) + { + setDeltaTransferIn(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("deltaTransferOut"))) { - setDeltaTransferOut(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("deltaTransferOut")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("deltaTransferOut")]; + if(!fieldValue.is_null()) + { + setDeltaTransferOut(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("deltaAmount"))) { - setDeltaAmount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("deltaAmount")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("deltaAmount")]; + if(!fieldValue.is_null()) + { + setDeltaAmount(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("deposited"))) { - setDeposited(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("deposited")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("deposited")]; + if(!fieldValue.is_null()) + { + setDeposited(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("withdrawn"))) { - setWithdrawn(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("withdrawn")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("withdrawn")]; + if(!fieldValue.is_null()) + { + setWithdrawn(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("transferIn"))) { - setTransferIn(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("transferIn")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("transferIn")]; + if(!fieldValue.is_null()) + { + setTransferIn(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("transferOut"))) { - setTransferOut(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("transferOut")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("transferOut")]; + if(!fieldValue.is_null()) + { + setTransferOut(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("amount"))) { - setAmount(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("amount")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("amount")]; + if(!fieldValue.is_null()) + { + setAmount(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pendingCredit"))) { - setPendingCredit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("pendingCredit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pendingCredit")]; + if(!fieldValue.is_null()) + { + setPendingCredit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("pendingDebit"))) { - setPendingDebit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("pendingDebit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("pendingDebit")]; + if(!fieldValue.is_null()) + { + setPendingDebit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("confirmedDebit"))) { - setConfirmedDebit(ModelBase::doubleFromJson(val[utility::conversions::to_string_t("confirmedDebit")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("confirmedDebit")]; + if(!fieldValue.is_null()) + { + setConfirmedDebit(ModelBase::doubleFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("timestamp"))) { - setTimestamp(ModelBase::dateFromJson(val[utility::conversions::to_string_t("timestamp")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("timestamp")]; + if(!fieldValue.is_null()) + { + setTimestamp(ModelBase::dateFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("addr"))) { - setAddr(ModelBase::stringFromJson(val[utility::conversions::to_string_t("addr")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("addr")]; + if(!fieldValue.is_null()) + { + setAddr(ModelBase::stringFromJson(fieldValue)); + } } if(val.has_field(utility::conversions::to_string_t("script"))) { - setScript(ModelBase::stringFromJson(val[utility::conversions::to_string_t("script")])); + web::json::value& fieldValue = val[utility::conversions::to_string_t("script")]; + if(!fieldValue.is_null()) + { + setScript(ModelBase::stringFromJson(fieldValue)); + } } { m_WithdrawalLock.clear(); diff --git a/auto-generated/cpprest/model/Wallet.h b/auto-generated/cpprest/model/Wallet.h index 23d009f34..39de72275 100644 --- a/auto-generated/cpprest/model/Wallet.h +++ b/auto-generated/cpprest/model/Wallet.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/X-any.cpp b/auto-generated/cpprest/model/X-any.cpp index afabeb94b..59093475f 100644 --- a/auto-generated/cpprest/model/X-any.cpp +++ b/auto-generated/cpprest/model/X-any.cpp @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/cpprest/model/X-any.h b/auto-generated/cpprest/model/X-any.h index edf2fe2e2..d38cccfbc 100644 --- a/auto-generated/cpprest/model/X-any.h +++ b/auto-generated/cpprest/model/X-any.h @@ -1,11 +1,11 @@ /** * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com * - * NOTE: This class is auto generated by the swagger code generator 2.4.0-SNAPSHOT. + * NOTE: This class is auto generated by the swagger code generator 2.4.11-SNAPSHOT. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ diff --git a/auto-generated/csharp/.swagger-codegen/VERSION b/auto-generated/csharp/.swagger-codegen/VERSION index 855ff9501..a4533be7f 100644 --- a/auto-generated/csharp/.swagger-codegen/VERSION +++ b/auto-generated/csharp/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.0-SNAPSHOT \ No newline at end of file +2.4.11-SNAPSHOT \ No newline at end of file diff --git a/auto-generated/csharp/IO.Swagger.sln b/auto-generated/csharp/IO.Swagger.sln index 24075d041..fdf71c015 100644 --- a/auto-generated/csharp/IO.Swagger.sln +++ b/auto-generated/csharp/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{50C94D32-2A0B-41BD-8FBD-2043F9B3D4C0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{53BA509F-35AC-49F3-8B62-0949A7EA59F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {50C94D32-2A0B-41BD-8FBD-2043F9B3D4C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {50C94D32-2A0B-41BD-8FBD-2043F9B3D4C0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {50C94D32-2A0B-41BD-8FBD-2043F9B3D4C0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {50C94D32-2A0B-41BD-8FBD-2043F9B3D4C0}.Release|Any CPU.Build.0 = Release|Any CPU + {53BA509F-35AC-49F3-8B62-0949A7EA59F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53BA509F-35AC-49F3-8B62-0949A7EA59F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53BA509F-35AC-49F3-8B62-0949A7EA59F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53BA509F-35AC-49F3-8B62-0949A7EA59F9}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/auto-generated/csharp/README.md b/auto-generated/csharp/README.md index 490059c2b..bec77cb51 100644 --- a/auto-generated/csharp/README.md +++ b/auto-generated/csharp/README.md @@ -1,6 +1,6 @@ # IO.Swagger - the C# library for the 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. +## 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. This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: @@ -70,31 +70,31 @@ namespace Example public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.ApiKey.Add("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.ApiKeyPrefix.Add("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.ApiKey.Add("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.ApiKey.Add("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.ApiKeyPrefix.Add("api-signature", "Bearer"); var apiInstance = new APIKeyApi(); - var apiKeyID = apiKeyID_example; // string | API Key ID (public component). + var reverse = true; // bool? | If true, will sort results newest first. (optional) (default to false) try { - // Disable an API Key. - APIKey result = apiInstance.APIKeyDisable(apiKeyID); + // Get your API Keys. + List result = apiInstance.APIKeyGet(reverse); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling APIKeyApi.APIKeyDisable: " + e.Message ); + Debug.Print("Exception when calling APIKeyApi.APIKeyGet: " + e.Message ); } } @@ -105,15 +105,11 @@ namespace Example ## Documentation for API Endpoints -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*APIKeyApi* | [**APIKeyDisable**](docs/APIKeyApi.md#apikeydisable) | **POST** /apiKey/disable | Disable an API Key. -*APIKeyApi* | [**APIKeyEnable**](docs/APIKeyApi.md#apikeyenable) | **POST** /apiKey/enable | Enable an API Key. *APIKeyApi* | [**APIKeyGet**](docs/APIKeyApi.md#apikeyget) | **GET** /apiKey | Get your API Keys. -*APIKeyApi* | [**APIKeyNew**](docs/APIKeyApi.md#apikeynew) | **POST** /apiKey | Create a new API Key. -*APIKeyApi* | [**APIKeyRemove**](docs/APIKeyApi.md#apikeyremove) | **DELETE** /apiKey | Remove an API Key. *AnnouncementApi* | [**AnnouncementGet**](docs/AnnouncementApi.md#announcementget) | **GET** /announcement | Get site announcements. *AnnouncementApi* | [**AnnouncementGetUrgent**](docs/AnnouncementApi.md#announcementgeturgent) | **GET** /announcement/urgent | Get urgent (banner) announcements. *ChatApi* | [**ChatGet**](docs/ChatApi.md#chatget) | **GET** /chat | Get chat messages. @@ -123,6 +119,7 @@ Class | Method | HTTP request | Description *ExecutionApi* | [**ExecutionGet**](docs/ExecutionApi.md#executionget) | **GET** /execution | Get all raw executions for your account. *ExecutionApi* | [**ExecutionGetTradeHistory**](docs/ExecutionApi.md#executiongettradehistory) | **GET** /execution/tradeHistory | Get all balance-affecting executions. This includes each trade, insurance charge, and settlement. *FundingApi* | [**FundingGet**](docs/FundingApi.md#fundingget) | **GET** /funding | Get funding history. +*GlobalNotificationApi* | [**GlobalNotificationGet**](docs/GlobalNotificationApi.md#globalnotificationget) | **GET** /globalNotification | Get your current GlobalNotifications. *InstrumentApi* | [**InstrumentGet**](docs/InstrumentApi.md#instrumentget) | **GET** /instrument | Get instruments. *InstrumentApi* | [**InstrumentGetActive**](docs/InstrumentApi.md#instrumentgetactive) | **GET** /instrument/active | Get all active instruments and instruments that have expired in <24hrs. *InstrumentApi* | [**InstrumentGetActiveAndIndices**](docs/InstrumentApi.md#instrumentgetactiveandindices) | **GET** /instrument/activeAndIndices | Helper method. Gets all active instruments and all indices. This is a join of the result of /indices and /active. @@ -133,7 +130,6 @@ Class | Method | HTTP request | Description *LeaderboardApi* | [**LeaderboardGet**](docs/LeaderboardApi.md#leaderboardget) | **GET** /leaderboard | Get current leaderboard. *LeaderboardApi* | [**LeaderboardGetName**](docs/LeaderboardApi.md#leaderboardgetname) | **GET** /leaderboard/name | Get your alias on the leaderboard. *LiquidationApi* | [**LiquidationGet**](docs/LiquidationApi.md#liquidationget) | **GET** /liquidation | Get liquidation orders. -*NotificationApi* | [**NotificationGet**](docs/NotificationApi.md#notificationget) | **GET** /notification | Get your current notifications. *OrderApi* | [**OrderAmend**](docs/OrderApi.md#orderamend) | **PUT** /order | Amend the quantity or price of an open order. *OrderApi* | [**OrderAmendBulk**](docs/OrderApi.md#orderamendbulk) | **PUT** /order/bulk | Amend multiple orders for the same symbol. *OrderApi* | [**OrderCancel**](docs/OrderApi.md#ordercancel) | **DELETE** /order | Cancel order(s). Send multiple order IDs to cancel in bulk. @@ -161,25 +157,24 @@ Class | Method | HTTP request | Description *TradeApi* | [**TradeGetBucketed**](docs/TradeApi.md#tradegetbucketed) | **GET** /trade/bucketed | Get previous trades in time buckets. *UserApi* | [**UserCancelWithdrawal**](docs/UserApi.md#usercancelwithdrawal) | **POST** /user/cancelWithdrawal | Cancel a withdrawal. *UserApi* | [**UserCheckReferralCode**](docs/UserApi.md#usercheckreferralcode) | **GET** /user/checkReferralCode | Check if a referral code is valid. +*UserApi* | [**UserCommunicationToken**](docs/UserApi.md#usercommunicationtoken) | **POST** /user/communicationToken | Register your communication token for mobile clients *UserApi* | [**UserConfirm**](docs/UserApi.md#userconfirm) | **POST** /user/confirmEmail | Confirm your email address with a token. -*UserApi* | [**UserConfirmEnableTFA**](docs/UserApi.md#userconfirmenabletfa) | **POST** /user/confirmEnableTFA | Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. *UserApi* | [**UserConfirmWithdrawal**](docs/UserApi.md#userconfirmwithdrawal) | **POST** /user/confirmWithdrawal | Confirm a withdrawal. -*UserApi* | [**UserDisableTFA**](docs/UserApi.md#userdisabletfa) | **POST** /user/disableTFA | Disable two-factor auth for this account. *UserApi* | [**UserGet**](docs/UserApi.md#userget) | **GET** /user | Get your user model. *UserApi* | [**UserGetAffiliateStatus**](docs/UserApi.md#usergetaffiliatestatus) | **GET** /user/affiliateStatus | Get your current affiliate/referral status. *UserApi* | [**UserGetCommission**](docs/UserApi.md#usergetcommission) | **GET** /user/commission | Get your account's commission status. *UserApi* | [**UserGetDepositAddress**](docs/UserApi.md#usergetdepositaddress) | **GET** /user/depositAddress | Get a deposit address. +*UserApi* | [**UserGetExecutionHistory**](docs/UserApi.md#usergetexecutionhistory) | **GET** /user/executionHistory | Get the execution history by day. *UserApi* | [**UserGetMargin**](docs/UserApi.md#usergetmargin) | **GET** /user/margin | Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. +*UserApi* | [**UserGetQuoteFillRatio**](docs/UserApi.md#usergetquotefillratio) | **GET** /user/quoteFillRatio | Get 7 days worth of Quote Fill Ratio statistics. *UserApi* | [**UserGetWallet**](docs/UserApi.md#usergetwallet) | **GET** /user/wallet | Get your current wallet information. *UserApi* | [**UserGetWalletHistory**](docs/UserApi.md#usergetwallethistory) | **GET** /user/walletHistory | Get a history of all of your wallet transactions (deposits, withdrawals, PNL). *UserApi* | [**UserGetWalletSummary**](docs/UserApi.md#usergetwalletsummary) | **GET** /user/walletSummary | Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). *UserApi* | [**UserLogout**](docs/UserApi.md#userlogout) | **POST** /user/logout | Log out of BitMEX. -*UserApi* | [**UserLogoutAll**](docs/UserApi.md#userlogoutall) | **POST** /user/logoutAll | Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. *UserApi* | [**UserMinWithdrawalFee**](docs/UserApi.md#userminwithdrawalfee) | **GET** /user/minWithdrawalFee | Get the minimum withdrawal fee for a currency. -*UserApi* | [**UserRequestEnableTFA**](docs/UserApi.md#userrequestenabletfa) | **POST** /user/requestEnableTFA | Get secret key for setting up two-factor auth. *UserApi* | [**UserRequestWithdrawal**](docs/UserApi.md#userrequestwithdrawal) | **POST** /user/requestWithdrawal | Request a withdrawal to an external wallet. *UserApi* | [**UserSavePreferences**](docs/UserApi.md#usersavepreferences) | **POST** /user/preferences | Save user preferences. -*UserApi* | [**UserUpdate**](docs/UserApi.md#userupdate) | **PUT** /user | Update your password, name, and other attributes. +*UserEventApi* | [**UserEventGet**](docs/UserEventApi.md#usereventget) | **GET** /userEvent | Get your user events @@ -191,25 +186,26 @@ Class | Method | HTTP request | Description - [Model.Announcement](docs/Announcement.md) - [Model.Chat](docs/Chat.md) - [Model.ChatChannel](docs/ChatChannel.md) + - [Model.CommunicationToken](docs/CommunicationToken.md) - [Model.ConnectedUsers](docs/ConnectedUsers.md) - [Model.Error](docs/Error.md) - [Model.ErrorError](docs/ErrorError.md) - [Model.Execution](docs/Execution.md) - [Model.Funding](docs/Funding.md) + - [Model.GlobalNotification](docs/GlobalNotification.md) - [Model.IndexComposite](docs/IndexComposite.md) - [Model.InlineResponse200](docs/InlineResponse200.md) - - [Model.InlineResponse2001](docs/InlineResponse2001.md) - [Model.Instrument](docs/Instrument.md) - [Model.InstrumentInterval](docs/InstrumentInterval.md) - [Model.Insurance](docs/Insurance.md) - [Model.Leaderboard](docs/Leaderboard.md) - [Model.Liquidation](docs/Liquidation.md) - [Model.Margin](docs/Margin.md) - - [Model.Notification](docs/Notification.md) - [Model.Order](docs/Order.md) - [Model.OrderBookL2](docs/OrderBookL2.md) - [Model.Position](docs/Position.md) - [Model.Quote](docs/Quote.md) + - [Model.QuoteFillRatio](docs/QuoteFillRatio.md) - [Model.Settlement](docs/Settlement.md) - [Model.Stats](docs/Stats.md) - [Model.StatsHistory](docs/StatsHistory.md) @@ -218,7 +214,8 @@ Class | Method | HTTP request | Description - [Model.TradeBin](docs/TradeBin.md) - [Model.Transaction](docs/Transaction.md) - [Model.User](docs/User.md) - - [Model.UserCommission](docs/UserCommission.md) + - [Model.UserCommissionsBySymbol](docs/UserCommissionsBySymbol.md) + - [Model.UserEvent](docs/UserEvent.md) - [Model.UserPreferences](docs/UserPreferences.md) - [Model.Wallet](docs/Wallet.md) - [Model.XAny](docs/XAny.md) @@ -227,18 +224,18 @@ Class | Method | HTTP request | Description ## Documentation for Authorization - -### apiKey + +### apiExpires - **Type**: API key -- **API key parameter name**: api-key +- **API key parameter name**: api-expires - **Location**: HTTP header - -### apiNonce + +### apiKey - **Type**: API key -- **API key parameter name**: api-nonce +- **API key parameter name**: api-key - **Location**: HTTP header diff --git a/auto-generated/csharp/docs/APIKeyApi.md b/auto-generated/csharp/docs/APIKeyApi.md index a8d7e15fb..8191e92f2 100644 --- a/auto-generated/csharp/docs/APIKeyApi.md +++ b/auto-generated/csharp/docs/APIKeyApi.md @@ -1,160 +1,12 @@ # IO.Swagger.Api.APIKeyApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**APIKeyDisable**](APIKeyApi.md#apikeydisable) | **POST** /apiKey/disable | Disable an API Key. -[**APIKeyEnable**](APIKeyApi.md#apikeyenable) | **POST** /apiKey/enable | Enable an API Key. [**APIKeyGet**](APIKeyApi.md#apikeyget) | **GET** /apiKey | Get your API Keys. -[**APIKeyNew**](APIKeyApi.md#apikeynew) | **POST** /apiKey | Create a new API Key. -[**APIKeyRemove**](APIKeyApi.md#apikeyremove) | **DELETE** /apiKey | Remove an API Key. - -# **APIKeyDisable** -> APIKey APIKeyDisable (string apiKeyID) - -Disable an API Key. - -### Example -```csharp -using System; -using System.Diagnostics; -using IO.Swagger.Api; -using IO.Swagger.Client; -using IO.Swagger.Model; - -namespace Example -{ - public class APIKeyDisableExample - { - public void main() - { - // Configure API key authorization: apiKey - Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); - // Configure API key authorization: apiSignature - Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - - var apiInstance = new APIKeyApi(); - var apiKeyID = apiKeyID_example; // string | API Key ID (public component). - - try - { - // Disable an API Key. - APIKey result = apiInstance.APIKeyDisable(apiKeyID); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling APIKeyApi.APIKeyDisable: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiKeyID** | **string**| API Key ID (public component). | - -### Return type - -[**APIKey**](APIKey.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **APIKeyEnable** -> APIKey APIKeyEnable (string apiKeyID) - -Enable an API Key. - -### Example -```csharp -using System; -using System.Diagnostics; -using IO.Swagger.Api; -using IO.Swagger.Client; -using IO.Swagger.Model; - -namespace Example -{ - public class APIKeyEnableExample - { - public void main() - { - // Configure API key authorization: apiKey - Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); - // Configure API key authorization: apiSignature - Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - - var apiInstance = new APIKeyApi(); - var apiKeyID = apiKeyID_example; // string | API Key ID (public component). - - try - { - // Enable an API Key. - APIKey result = apiInstance.APIKeyEnable(apiKeyID); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling APIKeyApi.APIKeyEnable: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiKeyID** | **string**| API Key ID (public component). | - -### Return type - -[**APIKey**](APIKey.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **APIKeyGet** > List APIKeyGet (bool? reverse = null) @@ -175,14 +27,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -218,161 +70,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **APIKeyNew** -> APIKey APIKeyNew (string name = null, string cidr = null, string permissions = null, bool? enabled = null, string token = null) - -Create a new API Key. - -API Keys can only be created via the frontend. - -### Example -```csharp -using System; -using System.Diagnostics; -using IO.Swagger.Api; -using IO.Swagger.Client; -using IO.Swagger.Model; - -namespace Example -{ - public class APIKeyNewExample - { - public void main() - { - // Configure API key authorization: apiKey - Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); - // Configure API key authorization: apiSignature - Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - - var apiInstance = new APIKeyApi(); - var name = name_example; // string | Key name. This name is for reference only. (optional) - var cidr = cidr_example; // string | CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. More on CIDR blocks (optional) - var permissions = permissions_example; // string | Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"]. (optional) - var enabled = true; // bool? | Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. (optional) (default to false) - var token = token_example; // string | OTP Token (YubiKey, Google Authenticator) (optional) - - try - { - // Create a new API Key. - APIKey result = apiInstance.APIKeyNew(name, cidr, permissions, enabled, token); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling APIKeyApi.APIKeyNew: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string**| Key name. This name is for reference only. | [optional] - **cidr** | **string**| CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. <a href=\"http://software77.net/cidr-101.html\">More on CIDR blocks</a> | [optional] - **permissions** | **string**| Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"]. | [optional] - **enabled** | **bool?**| Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. | [optional] [default to false] - **token** | **string**| OTP Token (YubiKey, Google Authenticator) | [optional] - -### Return type - -[**APIKey**](APIKey.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **APIKeyRemove** -> InlineResponse200 APIKeyRemove (string apiKeyID) - -Remove an API Key. - -### Example -```csharp -using System; -using System.Diagnostics; -using IO.Swagger.Api; -using IO.Swagger.Client; -using IO.Swagger.Model; - -namespace Example -{ - public class APIKeyRemoveExample - { - public void main() - { - // Configure API key authorization: apiKey - Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); - // Configure API key authorization: apiSignature - Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - - var apiInstance = new APIKeyApi(); - var apiKeyID = apiKeyID_example; // string | API Key ID (public component). - - try - { - // Remove an API Key. - InlineResponse200 result = apiInstance.APIKeyRemove(apiKeyID); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling APIKeyApi.APIKeyRemove: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiKeyID** | **string**| API Key ID (public component). | - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/Affiliate.md b/auto-generated/csharp/docs/Affiliate.md index 6c586bf2c..5d6bd32d3 100644 --- a/auto-generated/csharp/docs/Affiliate.md +++ b/auto-generated/csharp/docs/Affiliate.md @@ -18,6 +18,8 @@ Name | Type | Description | Notes **PendingPayout** | **decimal?** | | [optional] **Timestamp** | **DateTime?** | | [optional] **ReferrerAccount** | **double?** | | [optional] +**ReferralDiscount** | **double?** | | [optional] +**AffiliatePayout** | **double?** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/auto-generated/csharp/docs/AnnouncementApi.md b/auto-generated/csharp/docs/AnnouncementApi.md index a1bbe74df..ae25dfdad 100644 --- a/auto-generated/csharp/docs/AnnouncementApi.md +++ b/auto-generated/csharp/docs/AnnouncementApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.AnnouncementApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -87,14 +87,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -126,7 +126,7 @@ This endpoint does not need any parameter. ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/ChatApi.md b/auto-generated/csharp/docs/ChatApi.md index 287fa4b94..e62ab7a4f 100644 --- a/auto-generated/csharp/docs/ChatApi.md +++ b/auto-generated/csharp/docs/ChatApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.ChatApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -207,14 +207,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -252,7 +252,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/CommunicationToken.md b/auto-generated/csharp/docs/CommunicationToken.md new file mode 100644 index 000000000..7af643e36 --- /dev/null +++ b/auto-generated/csharp/docs/CommunicationToken.md @@ -0,0 +1,12 @@ +# IO.Swagger.Model.CommunicationToken +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**UserId** | **decimal?** | | +**DeviceToken** | **string** | | +**Channel** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/auto-generated/csharp/docs/ExecutionApi.md b/auto-generated/csharp/docs/ExecutionApi.md index f34e47c99..00aaf06e7 100644 --- a/auto-generated/csharp/docs/ExecutionApi.md +++ b/auto-generated/csharp/docs/ExecutionApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.ExecutionApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -30,21 +30,21 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); var apiInstance = new ExecutionApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -72,7 +72,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] @@ -87,7 +87,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -116,21 +116,21 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); var apiInstance = new ExecutionApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -158,7 +158,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] @@ -173,7 +173,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/FundingApi.md b/auto-generated/csharp/docs/FundingApi.md index 61cb933de..db0992cc1 100644 --- a/auto-generated/csharp/docs/FundingApi.md +++ b/auto-generated/csharp/docs/FundingApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.FundingApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -28,7 +28,7 @@ namespace Example public void main() { var apiInstance = new FundingApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -56,7 +56,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/csharp/docs/Notification.md b/auto-generated/csharp/docs/GlobalNotification.md similarity index 94% rename from auto-generated/csharp/docs/Notification.md rename to auto-generated/csharp/docs/GlobalNotification.md index aba64f6ac..95968e093 100644 --- a/auto-generated/csharp/docs/Notification.md +++ b/auto-generated/csharp/docs/GlobalNotification.md @@ -1,4 +1,4 @@ -# IO.Swagger.Model.Notification +# IO.Swagger.Model.GlobalNotification ## Properties Name | Type | Description | Notes diff --git a/auto-generated/csharp/docs/NotificationApi.md b/auto-generated/csharp/docs/GlobalNotificationApi.md similarity index 59% rename from auto-generated/csharp/docs/NotificationApi.md rename to auto-generated/csharp/docs/GlobalNotificationApi.md index 05903c277..431781c0b 100644 --- a/auto-generated/csharp/docs/NotificationApi.md +++ b/auto-generated/csharp/docs/GlobalNotificationApi.md @@ -1,17 +1,17 @@ -# IO.Swagger.Api.NotificationApi +# IO.Swagger.Api.GlobalNotificationApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**NotificationGet**](NotificationApi.md#notificationget) | **GET** /notification | Get your current notifications. +[**GlobalNotificationGet**](GlobalNotificationApi.md#globalnotificationget) | **GET** /globalNotification | Get your current GlobalNotifications. - -# **NotificationGet** -> List NotificationGet () + +# **GlobalNotificationGet** +> List GlobalNotificationGet () -Get your current notifications. +Get your current GlobalNotifications. This is an upcoming feature and currently does not return data. @@ -25,34 +25,34 @@ using IO.Swagger.Model; namespace Example { - public class NotificationGetExample + public class GlobalNotificationGetExample { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - var apiInstance = new NotificationApi(); + var apiInstance = new GlobalNotificationApi(); try { - // Get your current notifications. - List<Notification> result = apiInstance.NotificationGet(); + // Get your current GlobalNotifications. + List<GlobalNotification> result = apiInstance.GlobalNotificationGet(); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling NotificationApi.NotificationGet: " + e.Message ); + Debug.Print("Exception when calling GlobalNotificationApi.GlobalNotificationGet: " + e.Message ); } } } @@ -64,11 +64,11 @@ This endpoint does not need any parameter. ### Return type -[**List**](Notification.md) +[**List**](GlobalNotification.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/InlineResponse200.md b/auto-generated/csharp/docs/InlineResponse200.md index a46ce170d..cdadd61c3 100644 --- a/auto-generated/csharp/docs/InlineResponse200.md +++ b/auto-generated/csharp/docs/InlineResponse200.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Success** | **bool?** | | [optional] +**Name** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/auto-generated/csharp/docs/Instrument.md b/auto-generated/csharp/docs/Instrument.md index 390635fb1..36cdeb080 100644 --- a/auto-generated/csharp/docs/Instrument.md +++ b/auto-generated/csharp/docs/Instrument.md @@ -76,6 +76,8 @@ Name | Type | Description | Notes **TotalTurnover** | **decimal?** | | [optional] **Turnover** | **decimal?** | | [optional] **Turnover24h** | **decimal?** | | [optional] +**HomeNotional24h** | **double?** | | [optional] +**ForeignNotional24h** | **double?** | | [optional] **PrevPrice24h** | **double?** | | [optional] **Vwap** | **double?** | | [optional] **HighPrice** | **double?** | | [optional] diff --git a/auto-generated/csharp/docs/InstrumentApi.md b/auto-generated/csharp/docs/InstrumentApi.md index 3d1c9672f..c559a0e86 100644 --- a/auto-generated/csharp/docs/InstrumentApi.md +++ b/auto-generated/csharp/docs/InstrumentApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.InstrumentApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -35,7 +35,7 @@ namespace Example public void main() { var apiInstance = new InstrumentApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -63,7 +63,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] @@ -203,7 +203,7 @@ No authorization required Return all active contract series and interval pairs. -This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. +This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index. ### Example ```csharp @@ -256,7 +256,7 @@ No authorization required # **InstrumentGetCompositeIndex** -> List InstrumentGetCompositeIndex (double? account = null, string symbol = null, string filter = null, string columns = null, decimal? count = null, decimal? start = null, bool? reverse = null, DateTime? startTime = null, DateTime? endTime = null) +> List InstrumentGetCompositeIndex (string symbol = null, string filter = null, string columns = null, decimal? count = null, decimal? start = null, bool? reverse = null, DateTime? startTime = null, DateTime? endTime = null) Show constituent parts of an index. @@ -277,7 +277,6 @@ namespace Example public void main() { var apiInstance = new InstrumentApi(); - var account = 1.2; // double? | (optional) var symbol = symbol_example; // string | The composite index symbol. (optional) (default to .XBT) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) @@ -290,7 +289,7 @@ namespace Example try { // Show constituent parts of an index. - List<IndexComposite> result = apiInstance.InstrumentGetCompositeIndex(account, symbol, filter, columns, count, start, reverse, startTime, endTime); + List<IndexComposite> result = apiInstance.InstrumentGetCompositeIndex(symbol, filter, columns, count, start, reverse, startTime, endTime); Debug.WriteLine(result); } catch (Exception e) @@ -306,7 +305,6 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **account** | **double?**| | [optional] **symbol** | **string**| The composite index symbol. | [optional] [default to .XBT] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] diff --git a/auto-generated/csharp/docs/InsuranceApi.md b/auto-generated/csharp/docs/InsuranceApi.md index 24df264cb..04b096a35 100644 --- a/auto-generated/csharp/docs/InsuranceApi.md +++ b/auto-generated/csharp/docs/InsuranceApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.InsuranceApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -28,7 +28,7 @@ namespace Example public void main() { var apiInstance = new InsuranceApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -56,7 +56,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/csharp/docs/LeaderboardApi.md b/auto-generated/csharp/docs/LeaderboardApi.md index 5a0635ce3..96a560924 100644 --- a/auto-generated/csharp/docs/LeaderboardApi.md +++ b/auto-generated/csharp/docs/LeaderboardApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.LeaderboardApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -69,7 +69,7 @@ No authorization required # **LeaderboardGetName** -> InlineResponse2001 LeaderboardGetName () +> InlineResponse200 LeaderboardGetName () Get your alias on the leaderboard. @@ -87,14 +87,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -105,7 +105,7 @@ namespace Example try { // Get your alias on the leaderboard. - InlineResponse2001 result = apiInstance.LeaderboardGetName(); + InlineResponse200 result = apiInstance.LeaderboardGetName(); Debug.WriteLine(result); } catch (Exception e) @@ -122,11 +122,11 @@ This endpoint does not need any parameter. ### Return type -[**InlineResponse2001**](InlineResponse2001.md) +[**InlineResponse200**](InlineResponse200.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/LiquidationApi.md b/auto-generated/csharp/docs/LiquidationApi.md index 0a48f1444..abb8dc287 100644 --- a/auto-generated/csharp/docs/LiquidationApi.md +++ b/auto-generated/csharp/docs/LiquidationApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.LiquidationApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -28,7 +28,7 @@ namespace Example public void main() { var apiInstance = new LiquidationApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -56,7 +56,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/csharp/docs/OrderApi.md b/auto-generated/csharp/docs/OrderApi.md index 474871490..93356816e 100644 --- a/auto-generated/csharp/docs/OrderApi.md +++ b/auto-generated/csharp/docs/OrderApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.OrderApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -21,7 +21,7 @@ Method | HTTP request | Description Amend the quantity or price of an open order. -Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Use the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts. These fields will round up to the nearest contract. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. +Send an `orderID` or `origClOrdID` to identify the order you wish to amend. Both order quantity and price can be amended. Only one `qty` field can be used to amend. Use the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful if you want to adjust your position's delta by a certain amount, regardless of how much of the order has already filled. > A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill. Like order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with a JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint. ### Example ```csharp @@ -37,14 +37,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -54,9 +54,9 @@ namespace Example var orderID = orderID_example; // string | Order ID (optional) var origClOrdID = origClOrdID_example; // string | Client Order ID. See POST /order. (optional) var clOrdID = clOrdID_example; // string | Optional new Client Order ID, requires `origClOrdID`. (optional) - var simpleOrderQty = 1.2; // double? | Optional order quantity in units of the underlying instrument (i.e. Bitcoin). (optional) + var simpleOrderQty = 1.2; // double? | Deprecated: simple orders are not supported after 2018/10/26 (optional) var orderQty = 8.14; // decimal? | Optional order quantity in units of the instrument (i.e. contracts). (optional) - var simpleLeavesQty = 1.2; // double? | Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. (optional) + var simpleLeavesQty = 1.2; // double? | Deprecated: simple orders are not supported after 2018/10/26 (optional) var leavesQty = 8.14; // decimal? | Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. (optional) var price = 1.2; // double? | Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. (optional) var stopPx = 1.2; // double? | Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. (optional) @@ -85,9 +85,9 @@ Name | Type | Description | Notes **orderID** | **string**| Order ID | [optional] **origClOrdID** | **string**| Client Order ID. See POST /order. | [optional] **clOrdID** | **string**| Optional new Client Order ID, requires `origClOrdID`. | [optional] - **simpleOrderQty** | **double?**| Optional order quantity in units of the underlying instrument (i.e. Bitcoin). | [optional] + **simpleOrderQty** | **double?**| Deprecated: simple orders are not supported after 2018/10/26 | [optional] **orderQty** | **decimal?**| Optional order quantity in units of the instrument (i.e. contracts). | [optional] - **simpleLeavesQty** | **double?**| Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. | [optional] + **simpleLeavesQty** | **double?**| Deprecated: simple orders are not supported after 2018/10/26 | [optional] **leavesQty** | **decimal?**| Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. | [optional] **price** | **double?**| Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. | [optional] **stopPx** | **double?**| Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. | [optional] @@ -100,7 +100,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -131,14 +131,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -174,7 +174,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -205,14 +205,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -252,7 +252,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -281,14 +281,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -328,7 +328,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -359,14 +359,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -402,7 +402,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -433,14 +433,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -478,7 +478,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -509,21 +509,21 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); var apiInstance = new OrderApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -551,7 +551,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] @@ -566,7 +566,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -581,7 +581,7 @@ Name | Type | Description | Notes Create a new order. -## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: * **Limit**: The default order type. Specify an `orderQty` and `price`. * **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. * **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as permitted by available margin, will become a limit order. The difference between this type and `Market` only affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining quantity in the books as a `Limit`. * **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. * `Close` Stops don't require an `orderQty`. See Execution Instructions below. * **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. * **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. * **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). * **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. * **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill. * **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. * **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first. * **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. Please follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing. BitMEX offers four advanced Linked Order types: * **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique. Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`. * **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes. * **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended down by the execution quantity. * **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally by the fill percentage. #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities Send a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency. This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is. #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` +## Placing Orders This endpoint is used for placing orders. See individual fields below for more details on their use. #### Order Types All orders require a `symbol`. All other fields are optional except when otherwise specified. These are the valid `ordType`s: - **Limit**: The default order type. Specify an `orderQty` and `price`. - **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel. - **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered into the book. - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher. - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your account so that it may trigger fully. - `Close` Stops don't require an `orderQty`. See Execution Instructions below. - **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`, and `price`. - **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders. - **LimitIfTouched**: As above; use for Take Profit Limit orders. #### Execution Instructions The following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`). - **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead. - **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`. - **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'` limit order that rests in the order book while the position is reduced by other orders, then its order quantity will be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first. - **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size. - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger above or below the `stopPx`. #### Linked Orders [Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/) #### Trailing Stops You may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market moves away from the peg, and freeze as the market moves toward it. To use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price specified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders. Requires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`. #### Simple Quantities [Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/) #### Rate Limits See the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate. You can also improve your reactivity to market movements while staying under your ratelimit by using the [Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay in the market and avoids the cancel/replace cycle. #### Tracking Your Orders If you want to keep track of order IDs yourself, set a unique `clOrdID` per order. This `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket), and can be used to get or cancel the order. Max length is 36 characters. You can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new ID as the `clOrdID` param, like so: ``` # Amends an order's leavesQty, and updates its clOrdID to \"def-456\" PUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000} ``` ### Example ```csharp @@ -597,14 +597,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -612,20 +612,20 @@ namespace Example var apiInstance = new OrderApi(); var symbol = symbol_example; // string | Instrument symbol. e.g. 'XBTUSD'. - var side = side_example; // string | Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. (optional) - var simpleOrderQty = 1.2; // double? | Order quantity in units of the underlying instrument (i.e. Bitcoin). (optional) + var side = side_example; // string | Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative. (optional) + var simpleOrderQty = 1.2; // double? | Deprecated: simple orders are not supported after 2018/10/26 (optional) var orderQty = 8.14; // decimal? | Order quantity in units of the instrument (i.e. contracts). (optional) var price = 1.2; // double? | Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. (optional) var displayQty = 8.14; // decimal? | Optional quantity to display in the book. Use 0 for a fully hidden order. (optional) var stopPx = 1.2; // double? | Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. (optional) var clOrdID = clOrdID_example; // string | Optional Client Order ID. This clOrdID will come back on the order and any related executions. (optional) - var clOrdLinkID = clOrdLinkID_example; // string | Optional Client Order Link ID for contingent orders. (optional) + var clOrdLinkID = clOrdLinkID_example; // string | Deprecated: linked orders are not supported after 2018/11/10. (optional) var pegOffsetValue = 1.2; // double? | Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. (optional) var pegPriceType = pegPriceType_example; // string | Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. (optional) - var ordType = ordType_example; // string | Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. (optional) (default to Limit) - var timeInForce = timeInForce_example; // string | Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. (optional) + var ordType = ordType_example; // string | Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. (optional) (default to Limit) + var timeInForce = timeInForce_example; // string | Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. (optional) var execInst = execInst_example; // string | Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. (optional) - var contingencyType = contingencyType_example; // string | Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. (optional) + var contingencyType = contingencyType_example; // string | Deprecated: linked orders are not supported after 2018/11/10. (optional) var text = text_example; // string | Optional order annotation. e.g. 'Take profit'. (optional) try @@ -648,20 +648,20 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **symbol** | **string**| Instrument symbol. e.g. 'XBTUSD'. | - **side** | **string**| Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative. | [optional] - **simpleOrderQty** | **double?**| Order quantity in units of the underlying instrument (i.e. Bitcoin). | [optional] + **side** | **string**| Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative. | [optional] + **simpleOrderQty** | **double?**| Deprecated: simple orders are not supported after 2018/10/26 | [optional] **orderQty** | **decimal?**| Order quantity in units of the instrument (i.e. contracts). | [optional] **price** | **double?**| Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. | [optional] **displayQty** | **decimal?**| Optional quantity to display in the book. Use 0 for a fully hidden order. | [optional] **stopPx** | **double?**| Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use `execInst` of 'MarkPrice' or 'LastPrice' to define the current price used for triggering. | [optional] **clOrdID** | **string**| Optional Client Order ID. This clOrdID will come back on the order and any related executions. | [optional] - **clOrdLinkID** | **string**| Optional Client Order Link ID for contingent orders. | [optional] + **clOrdLinkID** | **string**| Deprecated: linked orders are not supported after 2018/11/10. | [optional] **pegOffsetValue** | **double?**| Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. | [optional] **pegPriceType** | **string**| Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg. | [optional] - **ordType** | **string**| Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. | [optional] [default to Limit] - **timeInForce** | **string**| Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders. | [optional] + **ordType** | **string**| Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified. | [optional] [default to Limit] + **timeInForce** | **string**| Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders. | [optional] **execInst** | **string**| Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires `displayQty` to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. | [optional] - **contingencyType** | **string**| Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional. | [optional] + **contingencyType** | **string**| Deprecated: linked orders are not supported after 2018/11/10. | [optional] **text** | **string**| Optional order annotation. e.g. 'Take profit'. | [optional] ### Return type @@ -670,7 +670,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -685,7 +685,7 @@ Name | Type | Description | Notes Create multiple new orders for the same symbol. -This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. +This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged. Each individual order object in the array should have the same properties as an individual POST /order call. This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call will only count as 1 request, 15 as 2, 32 as 4, and so on. For now, only `application/json` is supported on this endpoint. ### Example ```csharp @@ -701,14 +701,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -744,7 +744,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/OrderBookApi.md b/auto-generated/csharp/docs/OrderBookApi.md index 1a862a9c3..9b41c0cff 100644 --- a/auto-generated/csharp/docs/OrderBookApi.md +++ b/auto-generated/csharp/docs/OrderBookApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.OrderBookApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/auto-generated/csharp/docs/PositionApi.md b/auto-generated/csharp/docs/PositionApi.md index 3c3856f07..4712adeab 100644 --- a/auto-generated/csharp/docs/PositionApi.md +++ b/auto-generated/csharp/docs/PositionApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.PositionApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -17,7 +17,7 @@ Method | HTTP request | Description Get your positions. -See the FIX Spec for explanations of these fields. +This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below. The fields _account_, _symbol_, _currency_ are unique to each position and form its key. - **account**: Your unique account ID. - **symbol**: The contract for this position. - **currency**: The margin currency for this position. - **underlying**: Meta data of the _symbol_. - **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_ - **commission**: The maximum of the maker, taker, and settlement fee. - **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage. - **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit. - **riskLimit**: This is a function of your _maintMarginReq_. - **leverage**: 1 / initMarginReq. - **crossMargin**: True/false depending on whether you set cross margin on this position. - **deleveragePercentile**: Indicates where your position is in the ADL queue. - **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position. - **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed. - **currentQty**: The current position amount in contracts. - **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_). - **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_). - **realisedCost**: The realised cost of this position calculated with regard to average cost accounting. - **unrealisedCost**: _currentCost_ - _realisedCost_. - **grossOpenCost**: The absolute value of your open orders for this symbol. - **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_). - **markPrice**: The mark price of the symbol in _quoteCurrency_. - **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_). - **homeNotional**: Value of position in units of _underlying_. - **foreignNotional**: Value of position in units of _quoteCurrency_. - **realisedPnl**: The negative of _realisedCost_. - **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_. - **unrealisedPnl**: _unrealisedGrossPnl_. - **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated. - **bankruptPrice**: Once markPrice reaches this price, this position will have no equity. ### Example ```csharp @@ -33,14 +33,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -80,7 +80,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -109,14 +109,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -154,7 +154,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -183,14 +183,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -228,7 +228,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -257,14 +257,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -302,7 +302,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -331,14 +331,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -376,7 +376,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/QuoteApi.md b/auto-generated/csharp/docs/QuoteApi.md index a2cd34343..2ce2314cc 100644 --- a/auto-generated/csharp/docs/QuoteApi.md +++ b/auto-generated/csharp/docs/QuoteApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.QuoteApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -29,7 +29,7 @@ namespace Example public void main() { var apiInstance = new QuoteApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -57,7 +57,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] @@ -87,6 +87,8 @@ No authorization required Get previous quotes in time buckets. +Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. + ### Example ```csharp using System; @@ -104,7 +106,7 @@ namespace Example var apiInstance = new QuoteApi(); var binSize = binSize_example; // string | Time interval to bucket by. Available options: [1m,5m,1h,1d]. (optional) (default to 1m) var partial = true; // bool? | If true, will send in-progress (incomplete) bins for the current time period. (optional) (default to false) - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -134,7 +136,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **binSize** | **string**| Time interval to bucket by. Available options: [1m,5m,1h,1d]. | [optional] [default to 1m] **partial** | **bool?**| If true, will send in-progress (incomplete) bins for the current time period. | [optional] [default to false] - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/csharp/docs/QuoteFillRatio.md b/auto-generated/csharp/docs/QuoteFillRatio.md new file mode 100644 index 000000000..6ee7c1326 --- /dev/null +++ b/auto-generated/csharp/docs/QuoteFillRatio.md @@ -0,0 +1,15 @@ +# IO.Swagger.Model.QuoteFillRatio +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **DateTime?** | | +**Account** | **double?** | | [optional] +**QuoteCount** | **double?** | | [optional] +**DealtCount** | **double?** | | [optional] +**QuotesMavg7** | **double?** | | [optional] +**DealtMavg7** | **double?** | | [optional] +**QuoteFillRatioMavg7** | **double?** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/auto-generated/csharp/docs/SchemaApi.md b/auto-generated/csharp/docs/SchemaApi.md index 6da75a181..df9ee9e64 100644 --- a/auto-generated/csharp/docs/SchemaApi.md +++ b/auto-generated/csharp/docs/SchemaApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.SchemaApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/auto-generated/csharp/docs/SettlementApi.md b/auto-generated/csharp/docs/SettlementApi.md index 601a29ed2..613bed6ab 100644 --- a/auto-generated/csharp/docs/SettlementApi.md +++ b/auto-generated/csharp/docs/SettlementApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.SettlementApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -28,7 +28,7 @@ namespace Example public void main() { var apiInstance = new SettlementApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -56,7 +56,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/csharp/docs/StatsApi.md b/auto-generated/csharp/docs/StatsApi.md index 01b65c6e2..23d9a3289 100644 --- a/auto-generated/csharp/docs/StatsApi.md +++ b/auto-generated/csharp/docs/StatsApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.StatsApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/auto-generated/csharp/docs/TradeApi.md b/auto-generated/csharp/docs/TradeApi.md index 28b18cb18..f2b7367cb 100644 --- a/auto-generated/csharp/docs/TradeApi.md +++ b/auto-generated/csharp/docs/TradeApi.md @@ -1,6 +1,6 @@ # IO.Swagger.Api.TradeApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -31,7 +31,7 @@ namespace Example public void main() { var apiInstance = new TradeApi(); - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -59,7 +59,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] @@ -89,6 +89,8 @@ No authorization required Get previous trades in time buckets. +Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint. Also note the `open` price is equal to the `close` price of the previous timeframe bucket. + ### Example ```csharp using System; @@ -106,7 +108,7 @@ namespace Example var apiInstance = new TradeApi(); var binSize = binSize_example; // string | Time interval to bucket by. Available options: [1m,5m,1h,1d]. (optional) (default to 1m) var partial = true; // bool? | If true, will send in-progress (incomplete) bins for the current time period. (optional) (default to false) - var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. (optional) + var symbol = symbol_example; // string | Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. (optional) var filter = filter_example; // string | Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. (optional) var columns = columns_example; // string | Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. (optional) var count = 8.14; // decimal? | Number of results to fetch. (optional) (default to 100) @@ -136,7 +138,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **binSize** | **string**| Time interval to bucket by. Available options: [1m,5m,1h,1d]. | [optional] [default to 1m] **partial** | **bool?**| If true, will send in-progress (incomplete) bins for the current time period. | [optional] [default to false] - **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`. | [optional] + **symbol** | **string**| Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series. You can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`. | [optional] **filter** | **string**| Generic table filter. Send JSON key/value pairs, such as `{\"key\": \"value\"}`. You can key on individual fields, and do more advanced querying on timestamps. See the [Timestamp Docs](https://www.bitmex.com/app/restAPI#Timestamp-Filters) for more details. | [optional] **columns** | **string**| Array of column names to fetch. If omitted, will return all columns. Note that this method will always return item keys, even when not specified, so you may receive more columns that you expect. | [optional] **count** | **decimal?**| Number of results to fetch. | [optional] [default to 100] diff --git a/auto-generated/csharp/docs/UserApi.md b/auto-generated/csharp/docs/UserApi.md index 0677d31bd..6c64f4356 100644 --- a/auto-generated/csharp/docs/UserApi.md +++ b/auto-generated/csharp/docs/UserApi.md @@ -1,30 +1,28 @@ # IO.Swagger.Api.UserApi -All URIs are relative to *https://localhost/api/v1* +All URIs are relative to *https://www.bitmex.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**UserCancelWithdrawal**](UserApi.md#usercancelwithdrawal) | **POST** /user/cancelWithdrawal | Cancel a withdrawal. [**UserCheckReferralCode**](UserApi.md#usercheckreferralcode) | **GET** /user/checkReferralCode | Check if a referral code is valid. +[**UserCommunicationToken**](UserApi.md#usercommunicationtoken) | **POST** /user/communicationToken | Register your communication token for mobile clients [**UserConfirm**](UserApi.md#userconfirm) | **POST** /user/confirmEmail | Confirm your email address with a token. -[**UserConfirmEnableTFA**](UserApi.md#userconfirmenabletfa) | **POST** /user/confirmEnableTFA | Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. [**UserConfirmWithdrawal**](UserApi.md#userconfirmwithdrawal) | **POST** /user/confirmWithdrawal | Confirm a withdrawal. -[**UserDisableTFA**](UserApi.md#userdisabletfa) | **POST** /user/disableTFA | Disable two-factor auth for this account. [**UserGet**](UserApi.md#userget) | **GET** /user | Get your user model. [**UserGetAffiliateStatus**](UserApi.md#usergetaffiliatestatus) | **GET** /user/affiliateStatus | Get your current affiliate/referral status. [**UserGetCommission**](UserApi.md#usergetcommission) | **GET** /user/commission | Get your account's commission status. [**UserGetDepositAddress**](UserApi.md#usergetdepositaddress) | **GET** /user/depositAddress | Get a deposit address. +[**UserGetExecutionHistory**](UserApi.md#usergetexecutionhistory) | **GET** /user/executionHistory | Get the execution history by day. [**UserGetMargin**](UserApi.md#usergetmargin) | **GET** /user/margin | Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. +[**UserGetQuoteFillRatio**](UserApi.md#usergetquotefillratio) | **GET** /user/quoteFillRatio | Get 7 days worth of Quote Fill Ratio statistics. [**UserGetWallet**](UserApi.md#usergetwallet) | **GET** /user/wallet | Get your current wallet information. [**UserGetWalletHistory**](UserApi.md#usergetwallethistory) | **GET** /user/walletHistory | Get a history of all of your wallet transactions (deposits, withdrawals, PNL). [**UserGetWalletSummary**](UserApi.md#usergetwalletsummary) | **GET** /user/walletSummary | Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). [**UserLogout**](UserApi.md#userlogout) | **POST** /user/logout | Log out of BitMEX. -[**UserLogoutAll**](UserApi.md#userlogoutall) | **POST** /user/logoutAll | Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. [**UserMinWithdrawalFee**](UserApi.md#userminwithdrawalfee) | **GET** /user/minWithdrawalFee | Get the minimum withdrawal fee for a currency. -[**UserRequestEnableTFA**](UserApi.md#userrequestenabletfa) | **POST** /user/requestEnableTFA | Get secret key for setting up two-factor auth. [**UserRequestWithdrawal**](UserApi.md#userrequestwithdrawal) | **POST** /user/requestWithdrawal | Request a withdrawal to an external wallet. [**UserSavePreferences**](UserApi.md#usersavepreferences) | **POST** /user/preferences | Save user preferences. -[**UserUpdate**](UserApi.md#userupdate) | **PUT** /user | Update your password, name, and other attributes. @@ -92,7 +90,7 @@ No authorization required Check if a referral code is valid. -If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404. +If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid. ### Example ```csharp @@ -147,11 +145,11 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserConfirm** -> AccessToken UserConfirm (string token) + +# **UserCommunicationToken** +> List UserCommunicationToken (string token, string platformAgent) -Confirm your email address with a token. +Register your communication token for mobile clients ### Example ```csharp @@ -163,22 +161,36 @@ using IO.Swagger.Model; namespace Example { - public class UserConfirmExample + public class UserCommunicationTokenExample { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); + // Configure API key authorization: apiKey + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: apiSignature + Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); + var apiInstance = new UserApi(); var token = token_example; // string | + var platformAgent = platformAgent_example; // string | try { - // Confirm your email address with a token. - AccessToken result = apiInstance.UserConfirm(token); + // Register your communication token for mobile clients + List<CommunicationToken> result = apiInstance.UserCommunicationToken(token, platformAgent); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserConfirm: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserCommunicationToken: " + e.Message ); } } } @@ -190,14 +202,15 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **token** | **string**| | + **platformAgent** | **string**| | ### Return type -[**AccessToken**](AccessToken.md) +[**List**](CommunicationToken.md) ### Authorization -No authorization required +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -206,11 +219,11 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserConfirmEnableTFA** -> bool? UserConfirmEnableTFA (string token, string type = null) + +# **UserConfirm** +> AccessToken UserConfirm (string token) -Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. +Confirm your email address with a token. ### Example ```csharp @@ -222,36 +235,22 @@ using IO.Swagger.Model; namespace Example { - public class UserConfirmEnableTFAExample + public class UserConfirmExample { public void main() { - // Configure API key authorization: apiKey - Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); - // Configure API key authorization: apiSignature - Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - var apiInstance = new UserApi(); - var token = token_example; // string | Token from your selected TFA type. - var type = type_example; // string | Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' (optional) + var token = token_example; // string | try { - // Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. - bool? result = apiInstance.UserConfirmEnableTFA(token, type); + // Confirm your email address with a token. + AccessToken result = apiInstance.UserConfirm(token); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserConfirmEnableTFA: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserConfirm: " + e.Message ); } } } @@ -262,16 +261,15 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **token** | **string**| Token from your selected TFA type. | - **type** | **string**| Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' | [optional] + **token** | **string**| | ### Return type -**bool?** +[**AccessToken**](AccessToken.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +No authorization required ### HTTP request headers @@ -339,80 +337,6 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserDisableTFA** -> bool? UserDisableTFA (string token, string type = null) - -Disable two-factor auth for this account. - -### Example -```csharp -using System; -using System.Diagnostics; -using IO.Swagger.Api; -using IO.Swagger.Client; -using IO.Swagger.Model; - -namespace Example -{ - public class UserDisableTFAExample - { - public void main() - { - // Configure API key authorization: apiKey - Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); - // Configure API key authorization: apiSignature - Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - - var apiInstance = new UserApi(); - var token = token_example; // string | Token from your selected TFA type. - var type = type_example; // string | Two-factor auth type. Supported types: 'GA' (Google Authenticator) (optional) - - try - { - // Disable two-factor auth for this account. - bool? result = apiInstance.UserDisableTFA(token, type); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling UserApi.UserDisableTFA: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **string**| Token from your selected TFA type. | - **type** | **string**| Two-factor auth type. Supported types: 'GA' (Google Authenticator) | [optional] - -### Return type - -**bool?** - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **UserGet** > User UserGet () @@ -433,14 +357,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -472,7 +396,7 @@ This endpoint does not need any parameter. ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -501,14 +425,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -540,7 +464,7 @@ This endpoint does not need any parameter. ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -551,7 +475,7 @@ This endpoint does not need any parameter. # **UserGetCommission** -> List UserGetCommission () +> UserCommissionsBySymbol UserGetCommission () Get your account's commission status. @@ -569,14 +493,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -587,7 +511,7 @@ namespace Example try { // Get your account's commission status. - List<UserCommission> result = apiInstance.UserGetCommission(); + UserCommissionsBySymbol result = apiInstance.UserGetCommission(); Debug.WriteLine(result); } catch (Exception e) @@ -604,11 +528,11 @@ This endpoint does not need any parameter. ### Return type -[**List**](UserCommission.md) +[**UserCommissionsBySymbol**](UserCommissionsBySymbol.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -637,14 +561,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -680,7 +604,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -689,11 +613,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserGetMargin** -> Margin UserGetMargin (string currency = null) + +# **UserGetExecutionHistory** +> Object UserGetExecutionHistory (string symbol, DateTime? timestamp) -Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. +Get the execution history by day. ### Example ```csharp @@ -705,35 +629,36 @@ using IO.Swagger.Model; namespace Example { - public class UserGetMarginExample + public class UserGetExecutionHistoryExample { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); var apiInstance = new UserApi(); - var currency = currency_example; // string | (optional) (default to XBt) + var symbol = symbol_example; // string | (default to XBTUSD) + var timestamp = 2013-10-20T19:20:30+01:00; // DateTime? | (default to 2017-02-13T12:00:00.000Z) try { - // Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. - Margin result = apiInstance.UserGetMargin(currency); + // Get the execution history by day. + Object result = apiInstance.UserGetExecutionHistory(symbol, timestamp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserGetMargin: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserGetExecutionHistory: " + e.Message ); } } } @@ -744,15 +669,16 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **string**| | [optional] [default to XBt] + **symbol** | **string**| | [default to XBTUSD] + **timestamp** | **DateTime?**| | [default to 2017-02-13T12:00:00.000Z] ### Return type -[**Margin**](Margin.md) +**Object** ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -761,11 +687,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserGetWallet** -> Wallet UserGetWallet (string currency = null) + +# **UserGetMargin** +> Margin UserGetMargin (string currency = null) -Get your current wallet information. +Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. ### Example ```csharp @@ -777,18 +703,18 @@ using IO.Swagger.Model; namespace Example { - public class UserGetWalletExample + public class UserGetMarginExample { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -799,13 +725,13 @@ namespace Example try { - // Get your current wallet information. - Wallet result = apiInstance.UserGetWallet(currency); + // Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies. + Margin result = apiInstance.UserGetMargin(currency); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserGetWallet: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserGetMargin: " + e.Message ); } } } @@ -820,11 +746,11 @@ Name | Type | Description | Notes ### Return type -[**Wallet**](Wallet.md) +[**Margin**](Margin.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -833,11 +759,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserGetWalletHistory** -> List UserGetWalletHistory (string currency = null) + +# **UserGetQuoteFillRatio** +> QuoteFillRatio UserGetQuoteFillRatio () -Get a history of all of your wallet transactions (deposits, withdrawals, PNL). +Get 7 days worth of Quote Fill Ratio statistics. ### Example ```csharp @@ -849,35 +775,34 @@ using IO.Swagger.Model; namespace Example { - public class UserGetWalletHistoryExample + public class UserGetQuoteFillRatioExample { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); var apiInstance = new UserApi(); - var currency = currency_example; // string | (optional) (default to XBt) try { - // Get a history of all of your wallet transactions (deposits, withdrawals, PNL). - List<Transaction> result = apiInstance.UserGetWalletHistory(currency); + // Get 7 days worth of Quote Fill Ratio statistics. + QuoteFillRatio result = apiInstance.UserGetQuoteFillRatio(); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserGetWalletHistory: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserGetQuoteFillRatio: " + e.Message ); } } } @@ -885,18 +810,15 @@ namespace Example ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **string**| | [optional] [default to XBt] +This endpoint does not need any parameter. ### Return type -[**List**](Transaction.md) +[**QuoteFillRatio**](QuoteFillRatio.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -905,11 +827,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserGetWalletSummary** -> List UserGetWalletSummary (string currency = null) + +# **UserGetWallet** +> Wallet UserGetWallet (string currency = null) -Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). +Get your current wallet information. ### Example ```csharp @@ -921,18 +843,18 @@ using IO.Swagger.Model; namespace Example { - public class UserGetWalletSummaryExample + public class UserGetWalletExample { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -943,13 +865,13 @@ namespace Example try { - // Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). - List<Transaction> result = apiInstance.UserGetWalletSummary(currency); + // Get your current wallet information. + Wallet result = apiInstance.UserGetWallet(currency); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserGetWalletSummary: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserGetWallet: " + e.Message ); } } } @@ -964,11 +886,11 @@ Name | Type | Description | Notes ### Return type -[**List**](Transaction.md) +[**Wallet**](Wallet.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -977,11 +899,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserLogout** -> void UserLogout () + +# **UserGetWalletHistory** +> List UserGetWalletHistory (string currency = null, double? count = null, double? start = null) -Log out of BitMEX. +Get a history of all of your wallet transactions (deposits, withdrawals, PNL). ### Example ```csharp @@ -993,20 +915,37 @@ using IO.Swagger.Model; namespace Example { - public class UserLogoutExample + public class UserGetWalletHistoryExample { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); + // Configure API key authorization: apiKey + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: apiSignature + Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); + var apiInstance = new UserApi(); + var currency = currency_example; // string | (optional) (default to XBt) + var count = 1.2; // double? | Number of results to fetch. (optional) (default to 100) + var start = 1.2; // double? | Starting point for results. (optional) (default to 0) try { - // Log out of BitMEX. - apiInstance.UserLogout(); + // Get a history of all of your wallet transactions (deposits, withdrawals, PNL). + List<Transaction> result = apiInstance.UserGetWalletHistory(currency, count, start); + Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserLogout: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserGetWalletHistory: " + e.Message ); } } } @@ -1014,15 +953,20 @@ namespace Example ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| | [optional] [default to XBt] + **count** | **double?**| Number of results to fetch. | [optional] [default to 100] + **start** | **double?**| Starting point for results. | [optional] [default to 0] ### Return type -void (empty response body) +[**List**](Transaction.md) ### Authorization -No authorization required +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -1031,11 +975,11 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserLogoutAll** -> double? UserLogoutAll () + +# **UserGetWalletSummary** +> List UserGetWalletSummary (string currency = null) -Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. +Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). ### Example ```csharp @@ -1047,34 +991,35 @@ using IO.Swagger.Model; namespace Example { - public class UserLogoutAllExample + public class UserGetWalletSummaryExample { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); var apiInstance = new UserApi(); + var currency = currency_example; // string | (optional) (default to XBt) try { - // Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. - double? result = apiInstance.UserLogoutAll(); + // Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). + List<Transaction> result = apiInstance.UserGetWalletSummary(currency); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserLogoutAll: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserGetWalletSummary: " + e.Message ); } } } @@ -1082,15 +1027,18 @@ namespace Example ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| | [optional] [default to XBt] ### Return type -**double?** +[**List**](Transaction.md) ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -1099,13 +1047,11 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserMinWithdrawalFee** -> Object UserMinWithdrawalFee (string currency = null) - -Get the minimum withdrawal fee for a currency. + +# **UserLogout** +> void UserLogout () -This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency. +Log out of BitMEX. ### Example ```csharp @@ -1117,22 +1063,20 @@ using IO.Swagger.Model; namespace Example { - public class UserMinWithdrawalFeeExample + public class UserLogoutExample { public void main() { var apiInstance = new UserApi(); - var currency = currency_example; // string | (optional) (default to XBt) try { - // Get the minimum withdrawal fee for a currency. - Object result = apiInstance.UserMinWithdrawalFee(currency); - Debug.WriteLine(result); + // Log out of BitMEX. + apiInstance.UserLogout(); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserMinWithdrawalFee: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserLogout: " + e.Message ); } } } @@ -1140,14 +1084,11 @@ namespace Example ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **string**| | [optional] [default to XBt] +This endpoint does not need any parameter. ### Return type -**Object** +void (empty response body) ### Authorization @@ -1160,13 +1101,13 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UserRequestEnableTFA** -> bool? UserRequestEnableTFA (string type = null) + +# **UserMinWithdrawalFee** +> Object UserMinWithdrawalFee (string currency = null) -Get secret key for setting up two-factor auth. +Get the minimum withdrawal fee for a currency. -Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled. +This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency. ### Example ```csharp @@ -1178,35 +1119,22 @@ using IO.Swagger.Model; namespace Example { - public class UserRequestEnableTFAExample + public class UserMinWithdrawalFeeExample { public void main() { - // Configure API key authorization: apiKey - Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); - // Configure API key authorization: apiSignature - Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - var apiInstance = new UserApi(); - var type = type_example; // string | Two-factor auth type. Supported types: 'GA' (Google Authenticator) (optional) + var currency = currency_example; // string | (optional) (default to XBt) try { - // Get secret key for setting up two-factor auth. - bool? result = apiInstance.UserRequestEnableTFA(type); + // Get the minimum withdrawal fee for a currency. + Object result = apiInstance.UserMinWithdrawalFee(currency); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling UserApi.UserRequestEnableTFA: " + e.Message ); + Debug.Print("Exception when calling UserApi.UserMinWithdrawalFee: " + e.Message ); } } } @@ -1217,15 +1145,15 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **type** | **string**| Two-factor auth type. Supported types: 'GA' (Google Authenticator) | [optional] + **currency** | **string**| | [optional] [default to XBt] ### Return type -**bool?** +**Object** ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +No authorization required ### HTTP request headers @@ -1236,11 +1164,11 @@ Name | Type | Description | Notes # **UserRequestWithdrawal** -> Transaction UserRequestWithdrawal (string currency, decimal? amount, string address, string otpToken = null, double? fee = null) +> Transaction UserRequestWithdrawal (string currency, decimal? amount, string address, string otpToken = null, double? fee = null, string text = null) Request a withdrawal to an external wallet. -This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission. +This will send a confirmation email to the email address on record. ### Example ```csharp @@ -1256,14 +1184,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1275,11 +1203,12 @@ namespace Example var address = address_example; // string | Destination Address. var otpToken = otpToken_example; // string | 2FA token. Required if 2FA is enabled on your account. (optional) var fee = 1.2; // double? | Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. (optional) + var text = text_example; // string | Optional annotation, e.g. 'Transfer to home wallet'. (optional) try { // Request a withdrawal to an external wallet. - Transaction result = apiInstance.UserRequestWithdrawal(currency, amount, address, otpToken, fee); + Transaction result = apiInstance.UserRequestWithdrawal(currency, amount, address, otpToken, fee, text); Debug.WriteLine(result); } catch (Exception e) @@ -1300,6 +1229,7 @@ Name | Type | Description | Notes **address** | **string**| Destination Address. | **otpToken** | **string**| 2FA token. Required if 2FA is enabled on your account. | [optional] **fee** | **double?**| Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. | [optional] + **text** | **string**| Optional annotation, e.g. 'Transfer to home wallet'. | [optional] ### Return type @@ -1307,7 +1237,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers @@ -1336,14 +1266,14 @@ namespace Example { public void main() { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); // Configure API key authorization: apiKey Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); // Configure API key authorization: apiSignature Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1381,93 +1311,7 @@ Name | Type | Description | Notes ### Authorization -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UserUpdate** -> User UserUpdate (string firstname = null, string lastname = null, string oldPassword = null, string newPassword = null, string newPasswordConfirm = null, string username = null, string country = null, string pgpPubKey = null) - -Update your password, name, and other attributes. - -### Example -```csharp -using System; -using System.Diagnostics; -using IO.Swagger.Api; -using IO.Swagger.Client; -using IO.Swagger.Model; - -namespace Example -{ - public class UserUpdateExample - { - public void main() - { - // Configure API key authorization: apiKey - Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); - // Configure API key authorization: apiNonce - Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer"); - // Configure API key authorization: apiSignature - Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); - - var apiInstance = new UserApi(); - var firstname = firstname_example; // string | (optional) - var lastname = lastname_example; // string | (optional) - var oldPassword = oldPassword_example; // string | (optional) - var newPassword = newPassword_example; // string | (optional) - var newPasswordConfirm = newPasswordConfirm_example; // string | (optional) - var username = username_example; // string | Username can only be set once. To reset, email support. (optional) - var country = country_example; // string | Country of residence. (optional) - var pgpPubKey = pgpPubKey_example; // string | PGP Public Key. If specified, automated emails will be sentwith this key. (optional) - - try - { - // Update your password, name, and other attributes. - User result = apiInstance.UserUpdate(firstname, lastname, oldPassword, newPassword, newPasswordConfirm, username, country, pgpPubKey); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling UserApi.UserUpdate: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **firstname** | **string**| | [optional] - **lastname** | **string**| | [optional] - **oldPassword** | **string**| | [optional] - **newPassword** | **string**| | [optional] - **newPasswordConfirm** | **string**| | [optional] - **username** | **string**| Username can only be set once. To reset, email support. | [optional] - **country** | **string**| Country of residence. | [optional] - **pgpPubKey** | **string**| PGP Public Key. If specified, automated emails will be sentwith this key. | [optional] - -### Return type - -[**User**](User.md) - -### Authorization - -[apiKey](../README.md#apiKey), [apiNonce](../README.md#apiNonce), [apiSignature](../README.md#apiSignature) +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) ### HTTP request headers diff --git a/auto-generated/csharp/docs/UserCommission.md b/auto-generated/csharp/docs/UserCommission.md deleted file mode 100644 index a742ce605..000000000 --- a/auto-generated/csharp/docs/UserCommission.md +++ /dev/null @@ -1,12 +0,0 @@ -# IO.Swagger.Model.UserCommission -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MakerFee** | **double?** | | [optional] -**TakerFee** | **double?** | | [optional] -**SettlementFee** | **double?** | | [optional] -**MaxFee** | **double?** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/auto-generated/csharp/docs/InlineResponse2001.md b/auto-generated/csharp/docs/UserCommissionsBySymbol.md similarity index 78% rename from auto-generated/csharp/docs/InlineResponse2001.md rename to auto-generated/csharp/docs/UserCommissionsBySymbol.md index 7a4e42d67..4a18e5a98 100644 --- a/auto-generated/csharp/docs/InlineResponse2001.md +++ b/auto-generated/csharp/docs/UserCommissionsBySymbol.md @@ -1,9 +1,8 @@ -# IO.Swagger.Model.InlineResponse2001 +# IO.Swagger.Model.UserCommissionsBySymbol ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/auto-generated/csharp/docs/UserEvent.md b/auto-generated/csharp/docs/UserEvent.md new file mode 100644 index 000000000..bac622414 --- /dev/null +++ b/auto-generated/csharp/docs/UserEvent.md @@ -0,0 +1,19 @@ +# IO.Swagger.Model.UserEvent +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **double?** | | [optional] +**Type** | **string** | | +**Status** | **string** | | +**UserId** | **double?** | | +**CreatedById** | **double?** | | +**Ip** | **string** | | [optional] +**GeoipCountry** | **string** | | [optional] +**GeoipRegion** | **string** | | [optional] +**GeoipSubRegion** | **string** | | [optional] +**EventMeta** | **Object** | | [optional] +**Created** | **DateTime?** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/auto-generated/csharp/docs/UserEventApi.md b/auto-generated/csharp/docs/UserEventApi.md new file mode 100644 index 000000000..19184adcc --- /dev/null +++ b/auto-generated/csharp/docs/UserEventApi.md @@ -0,0 +1,83 @@ +# IO.Swagger.Api.UserEventApi + +All URIs are relative to *https://www.bitmex.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UserEventGet**](UserEventApi.md#usereventget) | **GET** /userEvent | Get your user events + + + +# **UserEventGet** +> List UserEventGet (double? count = null, double? startId = null) + +Get your user events + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class UserEventGetExample + { + public void main() + { + // Configure API key authorization: apiExpires + Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer"); + // Configure API key authorization: apiKey + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: apiSignature + Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer"); + + var apiInstance = new UserEventApi(); + var count = 1.2; // double? | Number of results to fetch. (optional) (default to 150) + var startId = 1.2; // double? | Cursor for pagination. (optional) + + try + { + // Get your user events + List<UserEvent> result = apiInstance.UserEventGet(count, startId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling UserEventApi.UserEventGet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **count** | **double?**| Number of results to fetch. | [optional] [default to 150] + **startId** | **double?**| Cursor for pagination. | [optional] + +### Return type + +[**List**](UserEvent.md) + +### Authorization + +[apiExpires](../README.md#apiExpires), [apiKey](../README.md#apiKey), [apiSignature](../README.md#apiSignature) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded + - **Accept**: application/json, application/xml, text/xml, application/javascript, text/javascript + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/auto-generated/csharp/docs/UserPreferences.md b/auto-generated/csharp/docs/UserPreferences.md index 874eafe5b..9a034240a 100644 --- a/auto-generated/csharp/docs/UserPreferences.md +++ b/auto-generated/csharp/docs/UserPreferences.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **Currency** | **string** | | [optional] **Debug** | **bool?** | | [optional] **DisableEmails** | **List<string>** | | [optional] +**DisablePush** | **List<string>** | | [optional] **HideConfirmDialogs** | **List<string>** | | [optional] **HideConnectionModal** | **bool?** | | [optional] **HideFromLeaderboard** | **bool?** | | [optional] [default to false] diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/APIKeyApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/APIKeyApiTests.cs index b73f9f6ce..c6ad2459d 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/APIKeyApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/APIKeyApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -64,30 +64,6 @@ public void InstanceTest() } - /// - /// Test APIKeyDisable - /// - [Test] - public void APIKeyDisableTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string apiKeyID = null; - //var response = instance.APIKeyDisable(apiKeyID); - //Assert.IsInstanceOf (response, "response is APIKey"); - } - - /// - /// Test APIKeyEnable - /// - [Test] - public void APIKeyEnableTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string apiKeyID = null; - //var response = instance.APIKeyEnable(apiKeyID); - //Assert.IsInstanceOf (response, "response is APIKey"); - } - /// /// Test APIKeyGet /// @@ -100,34 +76,6 @@ public void APIKeyGetTest() //Assert.IsInstanceOf> (response, "response is List"); } - /// - /// Test APIKeyNew - /// - [Test] - public void APIKeyNewTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string name = null; - //string cidr = null; - //string permissions = null; - //bool? enabled = null; - //string token = null; - //var response = instance.APIKeyNew(name, cidr, permissions, enabled, token); - //Assert.IsInstanceOf (response, "response is APIKey"); - } - - /// - /// Test APIKeyRemove - /// - [Test] - public void APIKeyRemoveTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string apiKeyID = null; - //var response = instance.APIKeyRemove(apiKeyID); - //Assert.IsInstanceOf (response, "response is InlineResponse200"); - } - } } diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/AnnouncementApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/AnnouncementApiTests.cs index 1d1381858..0f79c76c3 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/AnnouncementApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/AnnouncementApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/ChatApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/ChatApiTests.cs index d39bd27d6..f89828694 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/ChatApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/ChatApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/ExecutionApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/ExecutionApiTests.cs index b2f7fbb77..0d495d12d 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/ExecutionApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/ExecutionApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/FundingApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/FundingApiTests.cs index b5eb8031d..bd4add4ba 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/FundingApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/FundingApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/GlobalNotificationApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/GlobalNotificationApiTests.cs new file mode 100644 index 000000000..cc6461b12 --- /dev/null +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/GlobalNotificationApiTests.cs @@ -0,0 +1,80 @@ +/* + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using IO.Swagger.Client; +using IO.Swagger.Api; +using IO.Swagger.Model; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing GlobalNotificationApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class GlobalNotificationApiTests + { + private GlobalNotificationApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new GlobalNotificationApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GlobalNotificationApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' GlobalNotificationApi + //Assert.IsInstanceOfType(typeof(GlobalNotificationApi), instance, "instance is a GlobalNotificationApi"); + } + + + /// + /// Test GlobalNotificationGet + /// + [Test] + public void GlobalNotificationGetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GlobalNotificationGet(); + //Assert.IsInstanceOf> (response, "response is List"); + } + + } + +} diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/InstrumentApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/InstrumentApiTests.cs index 3450a7540..151adefd6 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/InstrumentApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/InstrumentApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -123,7 +123,6 @@ public void InstrumentGetActiveIntervalsTest() public void InstrumentGetCompositeIndexTest() { // TODO uncomment below to test the method and replace null with proper value - //double? account = null; //string symbol = null; //string filter = null; //string columns = null; @@ -132,7 +131,7 @@ public void InstrumentGetCompositeIndexTest() //bool? reverse = null; //DateTime? startTime = null; //DateTime? endTime = null; - //var response = instance.InstrumentGetCompositeIndex(account, symbol, filter, columns, count, start, reverse, startTime, endTime); + //var response = instance.InstrumentGetCompositeIndex(symbol, filter, columns, count, start, reverse, startTime, endTime); //Assert.IsInstanceOf> (response, "response is List"); } diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/InsuranceApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/InsuranceApiTests.cs index 00ca2fbfb..dd446c10b 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/InsuranceApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/InsuranceApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/LeaderboardApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/LeaderboardApiTests.cs index e6c073369..978853f8d 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/LeaderboardApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/LeaderboardApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -84,7 +84,7 @@ public void LeaderboardGetNameTest() { // TODO uncomment below to test the method and replace null with proper value //var response = instance.LeaderboardGetName(); - //Assert.IsInstanceOf (response, "response is InlineResponse2001"); + //Assert.IsInstanceOf (response, "response is InlineResponse200"); } } diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/LiquidationApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/LiquidationApiTests.cs index c19e12332..f9eaf7916 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/LiquidationApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/LiquidationApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/NotificationApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/NotificationApiTests.cs deleted file mode 100644 index cee1866f3..000000000 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/NotificationApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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. - * - * OpenAPI spec version: 1.2.0 - * Contact: support@bitmex.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using NUnit.Framework; - -using IO.Swagger.Client; -using IO.Swagger.Api; -using IO.Swagger.Model; - -namespace IO.Swagger.Test -{ - /// - /// Class for testing NotificationApi - /// - /// - /// This file is automatically generated by Swagger Codegen. - /// Please update the test case below to test the API endpoint. - /// - [TestFixture] - public class NotificationApiTests - { - private NotificationApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new NotificationApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of NotificationApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOfType' NotificationApi - //Assert.IsInstanceOfType(typeof(NotificationApi), instance, "instance is a NotificationApi"); - } - - - /// - /// Test NotificationGet - /// - [Test] - public void NotificationGetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.NotificationGet(); - //Assert.IsInstanceOf> (response, "response is List"); - } - - } - -} diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/OrderApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/OrderApiTests.cs index f14085742..475db9922 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/OrderApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/OrderApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/OrderBookApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/OrderBookApiTests.cs index da3860cdd..2e559c252 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/OrderBookApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/OrderBookApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/PositionApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/PositionApiTests.cs index a71bd6a69..d566519d6 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/PositionApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/PositionApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/QuoteApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/QuoteApiTests.cs index dd21d56ce..5c5396a1c 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/QuoteApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/QuoteApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/SchemaApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/SchemaApiTests.cs index 0c0f462bc..3f779269e 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/SchemaApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/SchemaApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/SettlementApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/SettlementApiTests.cs index c23cea182..8481df304 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/SettlementApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/SettlementApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/StatsApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/StatsApiTests.cs index 864df118f..fb49557c7 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/StatsApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/StatsApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/TradeApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/TradeApiTests.cs index b7999b5e6..f90cc695d 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/TradeApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/TradeApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/UserApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/UserApiTests.cs index 9f55d2e86..c3d5d11d8 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/Api/UserApiTests.cs +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/UserApiTests.cs @@ -1,7 +1,7 @@ /* * 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. + * ## 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. * * OpenAPI spec version: 1.2.0 * Contact: support@bitmex.com @@ -89,28 +89,28 @@ public void UserCheckReferralCodeTest() } /// - /// Test UserConfirm + /// Test UserCommunicationToken /// [Test] - public void UserConfirmTest() + public void UserCommunicationTokenTest() { // TODO uncomment below to test the method and replace null with proper value //string token = null; - //var response = instance.UserConfirm(token); - //Assert.IsInstanceOf (response, "response is AccessToken"); + //string platformAgent = null; + //var response = instance.UserCommunicationToken(token, platformAgent); + //Assert.IsInstanceOf> (response, "response is List"); } /// - /// Test UserConfirmEnableTFA + /// Test UserConfirm /// [Test] - public void UserConfirmEnableTFATest() + public void UserConfirmTest() { // TODO uncomment below to test the method and replace null with proper value //string token = null; - //string type = null; - //var response = instance.UserConfirmEnableTFA(token, type); - //Assert.IsInstanceOf (response, "response is bool?"); + //var response = instance.UserConfirm(token); + //Assert.IsInstanceOf (response, "response is AccessToken"); } /// @@ -125,19 +125,6 @@ public void UserConfirmWithdrawalTest() //Assert.IsInstanceOf (response, "response is Transaction"); } - /// - /// Test UserDisableTFA - /// - [Test] - public void UserDisableTFATest() - { - // TODO uncomment below to test the method and replace null with proper value - //string token = null; - //string type = null; - //var response = instance.UserDisableTFA(token, type); - //Assert.IsInstanceOf (response, "response is bool?"); - } - /// /// Test UserGet /// @@ -168,7 +155,7 @@ public void UserGetCommissionTest() { // TODO uncomment below to test the method and replace null with proper value //var response = instance.UserGetCommission(); - //Assert.IsInstanceOf> (response, "response is List"); + //Assert.IsInstanceOf (response, "response is UserCommissionsBySymbol"); } /// @@ -183,6 +170,19 @@ public void UserGetDepositAddressTest() //Assert.IsInstanceOf (response, "response is string"); } + /// + /// Test UserGetExecutionHistory + /// + [Test] + public void UserGetExecutionHistoryTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string symbol = null; + //DateTime? timestamp = null; + //var response = instance.UserGetExecutionHistory(symbol, timestamp); + //Assert.IsInstanceOf (response, "response is Object"); + } + /// /// Test UserGetMargin /// @@ -195,6 +195,17 @@ public void UserGetMarginTest() //Assert.IsInstanceOf (response, "response is Margin"); } + /// + /// Test UserGetQuoteFillRatio + /// + [Test] + public void UserGetQuoteFillRatioTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.UserGetQuoteFillRatio(); + //Assert.IsInstanceOf (response, "response is QuoteFillRatio"); + } + /// /// Test UserGetWallet /// @@ -215,7 +226,9 @@ public void UserGetWalletHistoryTest() { // TODO uncomment below to test the method and replace null with proper value //string currency = null; - //var response = instance.UserGetWalletHistory(currency); + //double? count = null; + //double? start = null; + //var response = instance.UserGetWalletHistory(currency, count, start); //Assert.IsInstanceOf> (response, "response is List"); } @@ -242,17 +255,6 @@ public void UserLogoutTest() } - /// - /// Test UserLogoutAll - /// - [Test] - public void UserLogoutAllTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.UserLogoutAll(); - //Assert.IsInstanceOf (response, "response is double?"); - } - /// /// Test UserMinWithdrawalFee /// @@ -265,18 +267,6 @@ public void UserMinWithdrawalFeeTest() //Assert.IsInstanceOf (response, "response is Object"); } - /// - /// Test UserRequestEnableTFA - /// - [Test] - public void UserRequestEnableTFATest() - { - // TODO uncomment below to test the method and replace null with proper value - //string type = null; - //var response = instance.UserRequestEnableTFA(type); - //Assert.IsInstanceOf (response, "response is bool?"); - } - /// /// Test UserRequestWithdrawal /// @@ -289,7 +279,8 @@ public void UserRequestWithdrawalTest() //string address = null; //string otpToken = null; //double? fee = null; - //var response = instance.UserRequestWithdrawal(currency, amount, address, otpToken, fee); + //string text = null; + //var response = instance.UserRequestWithdrawal(currency, amount, address, otpToken, fee, text); //Assert.IsInstanceOf (response, "response is Transaction"); } @@ -306,25 +297,6 @@ public void UserSavePreferencesTest() //Assert.IsInstanceOf (response, "response is User"); } - /// - /// Test UserUpdate - /// - [Test] - public void UserUpdateTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string firstname = null; - //string lastname = null; - //string oldPassword = null; - //string newPassword = null; - //string newPasswordConfirm = null; - //string username = null; - //string country = null; - //string pgpPubKey = null; - //var response = instance.UserUpdate(firstname, lastname, oldPassword, newPassword, newPasswordConfirm, username, country, pgpPubKey); - //Assert.IsInstanceOf (response, "response is User"); - } - } } diff --git a/auto-generated/csharp/src/IO.Swagger.Test/Api/UserEventApiTests.cs b/auto-generated/csharp/src/IO.Swagger.Test/Api/UserEventApiTests.cs new file mode 100644 index 000000000..549e72f18 --- /dev/null +++ b/auto-generated/csharp/src/IO.Swagger.Test/Api/UserEventApiTests.cs @@ -0,0 +1,82 @@ +/* + * 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. + * + * OpenAPI spec version: 1.2.0 + * Contact: support@bitmex.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using IO.Swagger.Client; +using IO.Swagger.Api; +using IO.Swagger.Model; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing UserEventApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class UserEventApiTests + { + private UserEventApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new UserEventApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UserEventApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' UserEventApi + //Assert.IsInstanceOfType(typeof(UserEventApi), instance, "instance is a UserEventApi"); + } + + + /// + /// Test UserEventGet + /// + [Test] + public void UserEventGetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //double? count = null; + //double? startId = null; + //var response = instance.UserEventGet(count, startId); + //Assert.IsInstanceOf> (response, "response is List"); + } + + } + +} diff --git a/auto-generated/csharp/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/auto-generated/csharp/src/IO.Swagger.Test/IO.Swagger.Test.csproj index dbbcf53d3..831565d70 100644 --- a/auto-generated/csharp/src/IO.Swagger.Test/IO.Swagger.Test.csproj +++ b/auto-generated/csharp/src/IO.Swagger.Test/IO.Swagger.Test.csproj @@ -2,7 +2,7 @@ +

Return type

- APIKey + array[APIKey]
@@ -402,7 +406,7 @@

Return type

Example data

Content-Type: application/json
-
{
+    
[ {
   "permissions" : [ { }, { } ],
   "created" : "2000-01-23T04:56:07.000+00:00",
   "name" : "name",
@@ -412,7 +416,17 @@ 

Example data

"nonce" : 0.80082819046101150206595775671303272247314453125, "userId" : 6.02745618307040320615897144307382404804229736328125, "enabled" : false -}
+}, { + "permissions" : [ { }, { } ], + "created" : "2000-01-23T04:56:07.000+00:00", + "name" : "name", + "cidr" : "cidr", + "id" : "id", + "secret" : "secret", + "nonce" : 0.80082819046101150206595775671303272247314453125, + "userId" : 6.02745618307040320615897144307382404804229736328125, + "enabled" : false +} ]

Produces

This API call produces the following media types according to the Accept request header; @@ -428,23 +442,27 @@

Produces

Responses

200

Request was successful - APIKey +

400

Parameter Error Error

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error
-
+

Announcement

+
Up -
post /apiKey/enable
-
Enable an API Key. (aPIKey.enable)
+
get /announcement
+
Get site announcements. (announcement.get)
@@ -457,17 +475,17 @@

Consumes

- -

Form parameters

+

Query parameters

-
apiKeyID (required)
+
columns (optional)
-
Form Parameter — API Key ID (public component).
+
Query Parameter — Array of column names to fetch. If omitted, will return all columns. format: JSON
+

Return type

- APIKey + array[Announcement]
@@ -475,17 +493,19 @@

Return type

Example data

Content-Type: application/json
-
{
-  "permissions" : [ { }, { } ],
-  "created" : "2000-01-23T04:56:07.000+00:00",
-  "name" : "name",
-  "cidr" : "cidr",
-  "id" : "id",
-  "secret" : "secret",
-  "nonce" : 0.80082819046101150206595775671303272247314453125,
-  "userId" : 6.02745618307040320615897144307382404804229736328125,
-  "enabled" : false
-}
+
[ {
+  "date" : "2000-01-23T04:56:07.000+00:00",
+  "link" : "link",
+  "id" : 0.80082819046101150206595775671303272247314453125,
+  "title" : "title",
+  "content" : "content"
+}, {
+  "date" : "2000-01-23T04:56:07.000+00:00",
+  "link" : "link",
+  "id" : 0.80082819046101150206595775671303272247314453125,
+  "title" : "title",
+  "content" : "content"
+} ]

Produces

This API call produces the following media types according to the Accept request header; @@ -501,23 +521,26 @@

Produces

Responses

200

Request was successful - APIKey +

400

Parameter Error Error

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error

-
+
Up -
get /apiKey
-
Get your API Keys. (aPIKey.get)
+
get /announcement/urgent
+
Get urgent (banner) announcements. (announcement.getUrgent)
@@ -530,17 +553,11 @@

Consumes

-

Query parameters

-
-
reverse (optional)
- -
Query Parameter — If true, will sort results newest first. default: false
-

Return type

- array[APIKey] + array[Announcement]
@@ -549,25 +566,17 @@

Return type

Example data

Content-Type: application/json
[ {
-  "permissions" : [ { }, { } ],
-  "created" : "2000-01-23T04:56:07.000+00:00",
-  "name" : "name",
-  "cidr" : "cidr",
-  "id" : "id",
-  "secret" : "secret",
-  "nonce" : 0.80082819046101150206595775671303272247314453125,
-  "userId" : 6.02745618307040320615897144307382404804229736328125,
-  "enabled" : false
+  "date" : "2000-01-23T04:56:07.000+00:00",
+  "link" : "link",
+  "id" : 0.80082819046101150206595775671303272247314453125,
+  "title" : "title",
+  "content" : "content"
 }, {
-  "permissions" : [ { }, { } ],
-  "created" : "2000-01-23T04:56:07.000+00:00",
-  "name" : "name",
-  "cidr" : "cidr",
-  "id" : "id",
-  "secret" : "secret",
-  "nonce" : 0.80082819046101150206595775671303272247314453125,
-  "userId" : 6.02745618307040320615897144307382404804229736328125,
-  "enabled" : false
+  "date" : "2000-01-23T04:56:07.000+00:00",
+  "link" : "link",
+  "id" : 0.80082819046101150206595775671303272247314453125,
+  "title" : "title",
+  "content" : "content"
 } ]

Produces

@@ -591,17 +600,21 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error

-
+

Chat

+
Up -
post /apiKey
-
Create a new API Key. (aPIKey.new)
-
API Keys can only be created via the frontend.
+
get /chat
+
Get chat messages. (chat.get)
+

Consumes

@@ -613,25 +626,23 @@

Consumes

- -

Form parameters

+

Query parameters

-
name (optional)
- -
Form Parameter — Key name. This name is for reference only.
cidr (optional)
+
count (optional)
-
Form Parameter — CIDR block to restrict this key to. To restrict to a single address, append "/32", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. More on CIDR blocks
permissions (optional)
+
Query Parameter — Number of results to fetch. default: 100 format: int32
start (optional)
-
Form Parameter — Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: ["order", "orderCancel", "withdraw"]. format: JSON
enabled (optional)
+
Query Parameter — Starting ID for results. default: 0 format: int32
reverse (optional)
-
Form Parameter — Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable. default: false
token (optional)
+
Query Parameter — If true, will sort results newest first. default: true
channelID (optional)
-
Form Parameter — OTP Token (YubiKey, Google Authenticator)
+
Query Parameter — Channel id. GET /chat/channels for ids. Leave blank for all. format: double
+

Return type

- APIKey + array[Chat]
@@ -639,17 +650,23 @@

Return type

Example data

Content-Type: application/json
-
{
-  "permissions" : [ { }, { } ],
-  "created" : "2000-01-23T04:56:07.000+00:00",
-  "name" : "name",
-  "cidr" : "cidr",
-  "id" : "id",
-  "secret" : "secret",
-  "nonce" : 0.80082819046101150206595775671303272247314453125,
-  "userId" : 6.02745618307040320615897144307382404804229736328125,
-  "enabled" : false
-}
+
[ {
+  "date" : "2000-01-23T04:56:07.000+00:00",
+  "html" : "html",
+  "id" : 0.80082819046101150206595775671303272247314453125,
+  "message" : "message",
+  "user" : "user",
+  "channelID" : 6.027456183070403,
+  "fromBot" : false
+}, {
+  "date" : "2000-01-23T04:56:07.000+00:00",
+  "html" : "html",
+  "id" : 0.80082819046101150206595775671303272247314453125,
+  "message" : "message",
+  "user" : "user",
+  "channelID" : 6.027456183070403,
+  "fromBot" : false
+} ]

Produces

This API call produces the following media types according to the Accept request header; @@ -665,23 +682,26 @@

Produces

Responses

200

Request was successful - APIKey +

400

Parameter Error Error

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error

-
+
Up -
delete /apiKey
-
Remove an API Key. (aPIKey.remove)
+
get /chat/channels
+
Get available channels. (chat.getChannels)
@@ -695,16 +715,10 @@

Consumes

-

Form parameters

-
-
apiKeyID (required)
- -
Form Parameter — API Key ID (public component).
-

Return type

@@ -712,9 +726,13 @@

Return type

Example data

Content-Type: application/json
-
{
-  "success" : true
-}
+
[ {
+  "name" : "name",
+  "id" : 0.80082819046101150206595775671303272247314453125
+}, {
+  "name" : "name",
+  "id" : 0.80082819046101150206595775671303272247314453125
+} ]

Produces

This API call produces the following media types according to the Accept request header; @@ -730,25 +748,27 @@

Produces

Responses

200

Request was successful - inline_response_200 +

400

Parameter Error Error

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error

-

Announcement

-
+
Up -
get /announcement
-
Get site announcements. (announcement.get)
-
+
get /chat/connected
+
Get connected users. (chat.getConnected)
+
Returns an array with browser users in the first position and API users (bots) in the second position.

Consumes

@@ -760,17 +780,11 @@

Consumes

-

Query parameters

-
-
columns (optional)
- -
Query Parameter — Array of column names to fetch. If omitted, will return all columns. format: JSON
-

Return type

@@ -778,19 +792,10 @@

Return type

Example data

Content-Type: application/json
-
[ {
-  "date" : "2000-01-23T04:56:07.000+00:00",
-  "link" : "link",
-  "id" : 0.80082819046101150206595775671303272247314453125,
-  "title" : "title",
-  "content" : "content"
-}, {
-  "date" : "2000-01-23T04:56:07.000+00:00",
-  "link" : "link",
-  "id" : 0.80082819046101150206595775671303272247314453125,
-  "title" : "title",
-  "content" : "content"
-} ]
+
{
+  "bots" : 6.02745618307040320615897144307382404804229736328125,
+  "users" : 0.80082819046101150206595775671303272247314453125
+}

Produces

This API call produces the following media types according to the Accept request header; @@ -806,23 +811,26 @@

Produces

Responses

200

Request was successful - + ConnectedUsers

400

Parameter Error Error

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error

-
+
Up -
get /announcement/urgent
-
Get urgent (banner) announcements. (announcement.getUrgent)
+
post /chat
+
Send a chat message. (chat.new)
@@ -836,10 +844,18 @@

Consumes

+

Form parameters

+
+
message (required)
+ +
Form Parameter
channelID (optional)
+ +
Form Parameter — Channel to post to. Default 1 (English). default: 1 format: double
+

Return type

- array[Announcement] + Chat
@@ -847,19 +863,15 @@

Return type

Example data

Content-Type: application/json
-
[ {
-  "date" : "2000-01-23T04:56:07.000+00:00",
-  "link" : "link",
-  "id" : 0.80082819046101150206595775671303272247314453125,
-  "title" : "title",
-  "content" : "content"
-}, {
+    
{
   "date" : "2000-01-23T04:56:07.000+00:00",
-  "link" : "link",
+  "html" : "html",
   "id" : 0.80082819046101150206595775671303272247314453125,
-  "title" : "title",
-  "content" : "content"
-} ]
+ "message" : "message", + "user" : "user", + "channelID" : 6.027456183070403, + "fromBot" : false +}

Produces

This API call produces the following media types according to the Accept request header; @@ -875,294 +887,15 @@

Produces

Responses

200

Request was successful - + Chat

400

Parameter Error Error

401

Unauthorized Error -

404

- Not Found - Error -
-
-

Chat

-
-
- Up -
get /chat
-
Get chat messages. (chat.get)
-
- - -

Consumes

- This API call consumes the following media types via the Content-Type request header: -
    -
  • application/json
  • -
  • application/x-www-form-urlencoded
  • -
- - - -

Query parameters

-
-
count (optional)
- -
Query Parameter — Number of results to fetch. default: 100 format: int32
start (optional)
- -
Query Parameter — Starting ID for results. default: 0 format: int32
reverse (optional)
- -
Query Parameter — If true, will sort results newest first. default: true
channelID (optional)
- -
Query Parameter — Channel id. GET /chat/channels for ids. Leave blank for all. format: double
-
- - -

Return type

-
- array[Chat] - -
- - - -

Example data

-
Content-Type: application/json
-
[ {
-  "date" : "2000-01-23T04:56:07.000+00:00",
-  "html" : "html",
-  "id" : 0.80082819046101150206595775671303272247314453125,
-  "message" : "message",
-  "user" : "user",
-  "channelID" : 6.027456183070403,
-  "fromBot" : false
-}, {
-  "date" : "2000-01-23T04:56:07.000+00:00",
-  "html" : "html",
-  "id" : 0.80082819046101150206595775671303272247314453125,
-  "message" : "message",
-  "user" : "user",
-  "channelID" : 6.027456183070403,
-  "fromBot" : false
-} ]
- -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    -
  • application/json
  • -
  • application/xml
  • -
  • text/xml
  • -
  • application/javascript
  • -
  • text/javascript
  • -
- -

Responses

-

200

- Request was successful - -

400

- Parameter Error - Error -

401

- Unauthorized - Error -

404

- Not Found - Error -
-
-
-
- Up -
get /chat/channels
-
Get available channels. (chat.getChannels)
-
- - -

Consumes

- This API call consumes the following media types via the Content-Type request header: -
    -
  • application/json
  • -
  • application/x-www-form-urlencoded
  • -
- - - - - -

Return type

-
- array[ChatChannel] - -
- - - -

Example data

-
Content-Type: application/json
-
[ {
-  "name" : "name",
-  "id" : 0.80082819046101150206595775671303272247314453125
-}, {
-  "name" : "name",
-  "id" : 0.80082819046101150206595775671303272247314453125
-} ]
- -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    -
  • application/json
  • -
  • application/xml
  • -
  • text/xml
  • -
  • application/javascript
  • -
  • text/javascript
  • -
- -

Responses

-

200

- Request was successful - -

400

- Parameter Error - Error -

401

- Unauthorized - Error -

404

- Not Found - Error -
-
-
-
- Up -
get /chat/connected
-
Get connected users. (chat.getConnected)
-
Returns an array with browser users in the first position and API users (bots) in the second position.
- - -

Consumes

- This API call consumes the following media types via the Content-Type request header: -
    -
  • application/json
  • -
  • application/x-www-form-urlencoded
  • -
- - - - - -

Return type

- - - - -

Example data

-
Content-Type: application/json
-
{
-  "bots" : 6.02745618307040320615897144307382404804229736328125,
-  "users" : 0.80082819046101150206595775671303272247314453125
-}
- -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    -
  • application/json
  • -
  • application/xml
  • -
  • text/xml
  • -
  • application/javascript
  • -
  • text/javascript
  • -
- -

Responses

-

200

- Request was successful - ConnectedUsers -

400

- Parameter Error - Error -

401

- Unauthorized - Error -

404

- Not Found - Error -
-
-
-
- Up -
post /chat
-
Send a chat message. (chat.new)
-
- - -

Consumes

- This API call consumes the following media types via the Content-Type request header: -
    -
  • application/json
  • -
  • application/x-www-form-urlencoded
  • -
- - - - -

Form parameters

-
-
message (required)
- -
Form Parameter
channelID (optional)
- -
Form Parameter — Channel to post to. Default 1 (English). default: 1 format: double
-
- -

Return type

-
- Chat - -
- - - -

Example data

-
Content-Type: application/json
-
{
-  "date" : "2000-01-23T04:56:07.000+00:00",
-  "html" : "html",
-  "id" : 0.80082819046101150206595775671303272247314453125,
-  "message" : "message",
-  "user" : "user",
-  "channelID" : 6.027456183070403,
-  "fromBot" : false
-}
- -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    -
  • application/json
  • -
  • application/xml
  • -
  • text/xml
  • -
  • application/javascript
  • -
  • text/javascript
  • -
- -

Responses

-

200

- Request was successful - Chat -

400

- Parameter Error - Error -

401

- Unauthorized +

403

+ Access Denied Error

404

Not Found @@ -1196,8 +929,8 @@

Query parameters

symbol (optional)
-
Query Parameter

Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

-

You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

+
Query Parameter

Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

+

You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

filter (optional)
Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
columns (optional)
@@ -1347,6 +1080,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -1373,8 +1109,8 @@

Query parameters

symbol (optional)
-
Query Parameter

Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

-

You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

+
Query Parameter

Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

+

You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

filter (optional)
Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
columns (optional)
@@ -1524,6 +1260,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -1551,8 +1290,8 @@

Query parameters

symbol (optional)
-
Query Parameter

Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

-

You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

+
Query Parameter

Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

+

You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

filter (optional)
Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
columns (optional)
@@ -1618,6 +1357,92 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error +

404

+ Not Found + Error +
+
+

GlobalNotification

+
+
+ Up +
get /globalNotification
+
Get your current GlobalNotifications. (globalNotification.get)
+
This is an upcoming feature and currently does not return data.
+ + +

Consumes

+ This API call consumes the following media types via the Content-Type request header: +
    +
  • application/json
  • +
  • application/x-www-form-urlencoded
  • +
+ + + + + +

Return type

+
+ array[GlobalNotification] + +
+ + + +

Example data

+
Content-Type: application/json
+
[ {
+  "date" : "2000-01-23T04:56:07.000+00:00",
+  "waitForVisibility" : true,
+  "closable" : true,
+  "sound" : "sound",
+  "id" : 0.80082819046101150206595775671303272247314453125,
+  "persist" : true,
+  "title" : "title",
+  "body" : "body",
+  "type" : "success",
+  "ttl" : 6.02745618307040320615897144307382404804229736328125
+}, {
+  "date" : "2000-01-23T04:56:07.000+00:00",
+  "waitForVisibility" : true,
+  "closable" : true,
+  "sound" : "sound",
+  "id" : 0.80082819046101150206595775671303272247314453125,
+  "persist" : true,
+  "title" : "title",
+  "body" : "body",
+  "type" : "success",
+  "ttl" : 6.02745618307040320615897144307382404804229736328125
+} ]
+ +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
  • text/xml
  • +
  • application/javascript
  • +
  • text/javascript
  • +
+ +

Responses

+

200

+ Request was successful + +

400

+ Parameter Error + Error +

401

+ Unauthorized + Error +

403

+ Access Denied + Error

404

Not Found Error @@ -1645,8 +1470,8 @@

Query parameters

symbol (optional)
-
Query Parameter

Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

-

You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

+
Query Parameter

Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

+

You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

filter (optional)
Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
columns (optional)
@@ -1678,12 +1503,12 @@

Return type

Example data

Content-Type: application/json
[ {
-  "optionUnderlyingPrice" : 0.8774076871421566,
+  "optionUnderlyingPrice" : 0.5199002018724985,
   "deleverage" : true,
   "riskLimit" : 1.489415909854170383397331534069962799549102783203125,
   "fundingBaseSymbol" : "fundingBaseSymbol",
-  "prevPrice24h" : 7.143538047012306,
-  "highPrice" : 7.058770351582356,
+  "prevPrice24h" : 7.058770351582356,
+  "highPrice" : 0.10263654006109402,
   "fairMethod" : "fairMethod",
   "taxed" : true,
   "state" : "state",
@@ -1693,14 +1518,14 @@ 

Example data

"publishTime" : "2000-01-23T04:56:07.000+00:00", "maintMargin" : 1.0246457001441578, "takerFee" : 4.965218492984954, - "fairBasis" : 4.258773108174356, + "fairBasis" : 4.678947989005849, "volume24h" : 6.87805222012787620400331434211693704128265380859375, "underlying" : "underlying", "quoteToSettleMultiplier" : 7.3862819483858839220147274318151175975799560546875, "fundingQuoteSymbol" : "fundingQuoteSymbol", "quoteCurrency" : "quoteCurrency", - "indicativeSettlePrice" : 9.132027271330688, - "settledPrice" : 9.702963800023566, + "indicativeSettlePrice" : 9.702963800023566, + "settledPrice" : 7.933506881737151, "relistInterval" : "2000-01-23T04:56:07.000+00:00", "prevClosePrice" : 8.762042012749001, "maxPrice" : 2.3021358869347655, @@ -1708,7 +1533,7 @@

Example data

"settle" : "2000-01-23T04:56:07.000+00:00", "buyLeg" : "buyLeg", "tickSize" : 9.301444243932576, - "markPrice" : 4.678947989005849, + "markPrice" : 9.132027271330688, "settlCurrency" : "settlCurrency", "listing" : "2000-01-23T04:56:07.000+00:00", "indicativeFundingRate" : 6.683562403749608, @@ -1717,20 +1542,20 @@

Example data

"limitDownPrice" : 9.018348186070783, "lastTickDirection" : "lastTickDirection", "rebalanceTimestamp" : "2000-01-23T04:56:07.000+00:00", - "fairBasisRate" : 6.628464275087742, - "lastPriceProtected" : 4.652396432933246, - "midPrice" : 3.0205796992916243, + "fairBasisRate" : 1.041444916118296, + "lastPriceProtected" : 7.740351818741173, + "midPrice" : 7.04836565559697, "insuranceFee" : 9.965781217890562, "optionStrikePrice" : 1.4658129805029452, "limitUpPrice" : 6.438423552598547, "bankruptLimitUpPrice" : 6.965117697638846, "rebalanceInterval" : "2000-01-23T04:56:07.000+00:00", "fundingRate" : 9.369310271410669, - "lastPrice" : 0.10263654006109402, + "lastPrice" : 8.969578798196912, "totalVolume" : 2.884162126668780246063761296682059764862060546875, "symbol" : "symbol", "capped" : true, - "vwap" : 0.8851374739011653, + "vwap" : 6.519180951018382, "closingTimestamp" : "2000-01-23T04:56:07.000+00:00", "typ" : "typ", "inverseLeg" : "inverseLeg", @@ -1738,22 +1563,22 @@

Example data

"prevTotalTurnover" : 5.94489560761401580890606055618263781070709228515625, "limit" : 7.457744773683766, "calcInterval" : "2000-01-23T04:56:07.000+00:00", - "lastChangePcnt" : 8.969578798196912, - "askPrice" : 3.0576100241049344, + "lastChangePcnt" : 3.0205796992916243, + "askPrice" : 5.533258397034986, "multiplier" : 3.61607674925191080461672754609026014804840087890625, - "indicativeTaxRate" : 7.260521264802104, + "indicativeTaxRate" : 0.8774076871421566, "settlementFee" : 5.025004791520295, "totalTurnover" : 6.70401929795003592715829654480330646038055419921875, "turnover24h" : 3.093745262666447448651751983561553061008453369140625, - "fairPrice" : 1.041444916118296, - "bidPrice" : 7.740351818741173, + "fairPrice" : 7.260521264802104, + "bidPrice" : 3.0576100241049344, "volume" : 6.77832496304801335185175048536621034145355224609375, - "impactMidPrice" : 5.533258397034986, + "impactMidPrice" : 4.078845849666752, "sellLeg" : "sellLeg", "optionStrikePcnt" : 0.8008281904610115, "maxOrderQty" : 5.63737665663332876420099637471139430999755859375, "hasLiquidity" : true, - "openInterest" : 4.078845849666752343409825698472559452056884765625, + "openInterest" : 6.6284642750877420525057459599338471889495849609375, "riskStep" : 6.8468526983526398765889098285697400569915771484375, "optionStrikeRound" : 6.027456183070403, "isQuanto" : true, @@ -1762,30 +1587,32 @@

Example data

"underlyingSymbol" : "underlyingSymbol", "fundingTimestamp" : "2000-01-23T04:56:07.000+00:00", "makerFee" : 1.1730742509559433, - "lowPrice" : 6.519180951018382, + "lowPrice" : 4.652396432933246, "underlyingToSettleMultiplier" : 4.1456080298839363962315474054776132106781005859375, "sessionInterval" : "2000-01-23T04:56:07.000+00:00", "fundingInterval" : "2000-01-23T04:56:07.000+00:00", "bankruptLimitDownPrice" : 3.5571952270680973, "turnover" : 3.35319334701124294184637619764544069766998291015625, - "impactAskPrice" : 3.2588565619047607, + "impactAskPrice" : 0.2025324113236393, "referenceSymbol" : "referenceSymbol", - "openValue" : 0.202532411323639305322785730822943150997161865234375, + "homeNotional24h" : 7.143538047012306, + "openValue" : 4.258773108174356281097061582840979099273681640625, "isInverse" : true, "lotSize" : 7.061401241503109105224211816675961017608642578125, "optionMultiplier" : 5.962133916683182, "openingTimestamp" : "2000-01-23T04:56:07.000+00:00", - "impactBidPrice" : 7.04836565559697, + "foreignNotional24h" : 0.8851374739011653, + "impactBidPrice" : 3.2588565619047607, "prevTotalVolume" : 1.2846590061165319429647979632136411964893341064453125, "initMargin" : 1.2315135367772556, "front" : "2000-01-23T04:56:07.000+00:00" }, { - "optionUnderlyingPrice" : 0.8774076871421566, + "optionUnderlyingPrice" : 0.5199002018724985, "deleverage" : true, "riskLimit" : 1.489415909854170383397331534069962799549102783203125, "fundingBaseSymbol" : "fundingBaseSymbol", - "prevPrice24h" : 7.143538047012306, - "highPrice" : 7.058770351582356, + "prevPrice24h" : 7.058770351582356, + "highPrice" : 0.10263654006109402, "fairMethod" : "fairMethod", "taxed" : true, "state" : "state", @@ -1795,14 +1622,14 @@

Example data

"publishTime" : "2000-01-23T04:56:07.000+00:00", "maintMargin" : 1.0246457001441578, "takerFee" : 4.965218492984954, - "fairBasis" : 4.258773108174356, + "fairBasis" : 4.678947989005849, "volume24h" : 6.87805222012787620400331434211693704128265380859375, "underlying" : "underlying", "quoteToSettleMultiplier" : 7.3862819483858839220147274318151175975799560546875, "fundingQuoteSymbol" : "fundingQuoteSymbol", "quoteCurrency" : "quoteCurrency", - "indicativeSettlePrice" : 9.132027271330688, - "settledPrice" : 9.702963800023566, + "indicativeSettlePrice" : 9.702963800023566, + "settledPrice" : 7.933506881737151, "relistInterval" : "2000-01-23T04:56:07.000+00:00", "prevClosePrice" : 8.762042012749001, "maxPrice" : 2.3021358869347655, @@ -1810,7 +1637,7 @@

Example data

"settle" : "2000-01-23T04:56:07.000+00:00", "buyLeg" : "buyLeg", "tickSize" : 9.301444243932576, - "markPrice" : 4.678947989005849, + "markPrice" : 9.132027271330688, "settlCurrency" : "settlCurrency", "listing" : "2000-01-23T04:56:07.000+00:00", "indicativeFundingRate" : 6.683562403749608, @@ -1819,20 +1646,20 @@

Example data

"limitDownPrice" : 9.018348186070783, "lastTickDirection" : "lastTickDirection", "rebalanceTimestamp" : "2000-01-23T04:56:07.000+00:00", - "fairBasisRate" : 6.628464275087742, - "lastPriceProtected" : 4.652396432933246, - "midPrice" : 3.0205796992916243, + "fairBasisRate" : 1.041444916118296, + "lastPriceProtected" : 7.740351818741173, + "midPrice" : 7.04836565559697, "insuranceFee" : 9.965781217890562, "optionStrikePrice" : 1.4658129805029452, "limitUpPrice" : 6.438423552598547, "bankruptLimitUpPrice" : 6.965117697638846, "rebalanceInterval" : "2000-01-23T04:56:07.000+00:00", "fundingRate" : 9.369310271410669, - "lastPrice" : 0.10263654006109402, + "lastPrice" : 8.969578798196912, "totalVolume" : 2.884162126668780246063761296682059764862060546875, "symbol" : "symbol", "capped" : true, - "vwap" : 0.8851374739011653, + "vwap" : 6.519180951018382, "closingTimestamp" : "2000-01-23T04:56:07.000+00:00", "typ" : "typ", "inverseLeg" : "inverseLeg", @@ -1840,22 +1667,22 @@

Example data

"prevTotalTurnover" : 5.94489560761401580890606055618263781070709228515625, "limit" : 7.457744773683766, "calcInterval" : "2000-01-23T04:56:07.000+00:00", - "lastChangePcnt" : 8.969578798196912, - "askPrice" : 3.0576100241049344, + "lastChangePcnt" : 3.0205796992916243, + "askPrice" : 5.533258397034986, "multiplier" : 3.61607674925191080461672754609026014804840087890625, - "indicativeTaxRate" : 7.260521264802104, + "indicativeTaxRate" : 0.8774076871421566, "settlementFee" : 5.025004791520295, "totalTurnover" : 6.70401929795003592715829654480330646038055419921875, "turnover24h" : 3.093745262666447448651751983561553061008453369140625, - "fairPrice" : 1.041444916118296, - "bidPrice" : 7.740351818741173, + "fairPrice" : 7.260521264802104, + "bidPrice" : 3.0576100241049344, "volume" : 6.77832496304801335185175048536621034145355224609375, - "impactMidPrice" : 5.533258397034986, + "impactMidPrice" : 4.078845849666752, "sellLeg" : "sellLeg", "optionStrikePcnt" : 0.8008281904610115, "maxOrderQty" : 5.63737665663332876420099637471139430999755859375, "hasLiquidity" : true, - "openInterest" : 4.078845849666752343409825698472559452056884765625, + "openInterest" : 6.6284642750877420525057459599338471889495849609375, "riskStep" : 6.8468526983526398765889098285697400569915771484375, "optionStrikeRound" : 6.027456183070403, "isQuanto" : true, @@ -1864,20 +1691,22 @@

Example data

"underlyingSymbol" : "underlyingSymbol", "fundingTimestamp" : "2000-01-23T04:56:07.000+00:00", "makerFee" : 1.1730742509559433, - "lowPrice" : 6.519180951018382, + "lowPrice" : 4.652396432933246, "underlyingToSettleMultiplier" : 4.1456080298839363962315474054776132106781005859375, "sessionInterval" : "2000-01-23T04:56:07.000+00:00", "fundingInterval" : "2000-01-23T04:56:07.000+00:00", "bankruptLimitDownPrice" : 3.5571952270680973, "turnover" : 3.35319334701124294184637619764544069766998291015625, - "impactAskPrice" : 3.2588565619047607, + "impactAskPrice" : 0.2025324113236393, "referenceSymbol" : "referenceSymbol", - "openValue" : 0.202532411323639305322785730822943150997161865234375, + "homeNotional24h" : 7.143538047012306, + "openValue" : 4.258773108174356281097061582840979099273681640625, "isInverse" : true, "lotSize" : 7.061401241503109105224211816675961017608642578125, "optionMultiplier" : 5.962133916683182, "openingTimestamp" : "2000-01-23T04:56:07.000+00:00", - "impactBidPrice" : 7.04836565559697, + "foreignNotional24h" : 0.8851374739011653, + "impactBidPrice" : 3.2588565619047607, "prevTotalVolume" : 1.2846590061165319429647979632136411964893341064453125, "initMargin" : 1.2315135367772556, "front" : "2000-01-23T04:56:07.000+00:00" @@ -1904,6 +1733,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -1939,12 +1771,12 @@

Return type

Example data

Content-Type: application/json
[ {
-  "optionUnderlyingPrice" : 0.8774076871421566,
+  "optionUnderlyingPrice" : 0.5199002018724985,
   "deleverage" : true,
   "riskLimit" : 1.489415909854170383397331534069962799549102783203125,
   "fundingBaseSymbol" : "fundingBaseSymbol",
-  "prevPrice24h" : 7.143538047012306,
-  "highPrice" : 7.058770351582356,
+  "prevPrice24h" : 7.058770351582356,
+  "highPrice" : 0.10263654006109402,
   "fairMethod" : "fairMethod",
   "taxed" : true,
   "state" : "state",
@@ -1954,14 +1786,14 @@ 

Example data

"publishTime" : "2000-01-23T04:56:07.000+00:00", "maintMargin" : 1.0246457001441578, "takerFee" : 4.965218492984954, - "fairBasis" : 4.258773108174356, + "fairBasis" : 4.678947989005849, "volume24h" : 6.87805222012787620400331434211693704128265380859375, "underlying" : "underlying", "quoteToSettleMultiplier" : 7.3862819483858839220147274318151175975799560546875, "fundingQuoteSymbol" : "fundingQuoteSymbol", "quoteCurrency" : "quoteCurrency", - "indicativeSettlePrice" : 9.132027271330688, - "settledPrice" : 9.702963800023566, + "indicativeSettlePrice" : 9.702963800023566, + "settledPrice" : 7.933506881737151, "relistInterval" : "2000-01-23T04:56:07.000+00:00", "prevClosePrice" : 8.762042012749001, "maxPrice" : 2.3021358869347655, @@ -1969,7 +1801,7 @@

Example data

"settle" : "2000-01-23T04:56:07.000+00:00", "buyLeg" : "buyLeg", "tickSize" : 9.301444243932576, - "markPrice" : 4.678947989005849, + "markPrice" : 9.132027271330688, "settlCurrency" : "settlCurrency", "listing" : "2000-01-23T04:56:07.000+00:00", "indicativeFundingRate" : 6.683562403749608, @@ -1978,20 +1810,20 @@

Example data

"limitDownPrice" : 9.018348186070783, "lastTickDirection" : "lastTickDirection", "rebalanceTimestamp" : "2000-01-23T04:56:07.000+00:00", - "fairBasisRate" : 6.628464275087742, - "lastPriceProtected" : 4.652396432933246, - "midPrice" : 3.0205796992916243, + "fairBasisRate" : 1.041444916118296, + "lastPriceProtected" : 7.740351818741173, + "midPrice" : 7.04836565559697, "insuranceFee" : 9.965781217890562, "optionStrikePrice" : 1.4658129805029452, "limitUpPrice" : 6.438423552598547, "bankruptLimitUpPrice" : 6.965117697638846, "rebalanceInterval" : "2000-01-23T04:56:07.000+00:00", "fundingRate" : 9.369310271410669, - "lastPrice" : 0.10263654006109402, + "lastPrice" : 8.969578798196912, "totalVolume" : 2.884162126668780246063761296682059764862060546875, "symbol" : "symbol", "capped" : true, - "vwap" : 0.8851374739011653, + "vwap" : 6.519180951018382, "closingTimestamp" : "2000-01-23T04:56:07.000+00:00", "typ" : "typ", "inverseLeg" : "inverseLeg", @@ -1999,22 +1831,22 @@

Example data

"prevTotalTurnover" : 5.94489560761401580890606055618263781070709228515625, "limit" : 7.457744773683766, "calcInterval" : "2000-01-23T04:56:07.000+00:00", - "lastChangePcnt" : 8.969578798196912, - "askPrice" : 3.0576100241049344, + "lastChangePcnt" : 3.0205796992916243, + "askPrice" : 5.533258397034986, "multiplier" : 3.61607674925191080461672754609026014804840087890625, - "indicativeTaxRate" : 7.260521264802104, + "indicativeTaxRate" : 0.8774076871421566, "settlementFee" : 5.025004791520295, "totalTurnover" : 6.70401929795003592715829654480330646038055419921875, "turnover24h" : 3.093745262666447448651751983561553061008453369140625, - "fairPrice" : 1.041444916118296, - "bidPrice" : 7.740351818741173, + "fairPrice" : 7.260521264802104, + "bidPrice" : 3.0576100241049344, "volume" : 6.77832496304801335185175048536621034145355224609375, - "impactMidPrice" : 5.533258397034986, + "impactMidPrice" : 4.078845849666752, "sellLeg" : "sellLeg", "optionStrikePcnt" : 0.8008281904610115, "maxOrderQty" : 5.63737665663332876420099637471139430999755859375, "hasLiquidity" : true, - "openInterest" : 4.078845849666752343409825698472559452056884765625, + "openInterest" : 6.6284642750877420525057459599338471889495849609375, "riskStep" : 6.8468526983526398765889098285697400569915771484375, "optionStrikeRound" : 6.027456183070403, "isQuanto" : true, @@ -2023,30 +1855,32 @@

Example data

"underlyingSymbol" : "underlyingSymbol", "fundingTimestamp" : "2000-01-23T04:56:07.000+00:00", "makerFee" : 1.1730742509559433, - "lowPrice" : 6.519180951018382, + "lowPrice" : 4.652396432933246, "underlyingToSettleMultiplier" : 4.1456080298839363962315474054776132106781005859375, "sessionInterval" : "2000-01-23T04:56:07.000+00:00", "fundingInterval" : "2000-01-23T04:56:07.000+00:00", "bankruptLimitDownPrice" : 3.5571952270680973, "turnover" : 3.35319334701124294184637619764544069766998291015625, - "impactAskPrice" : 3.2588565619047607, + "impactAskPrice" : 0.2025324113236393, "referenceSymbol" : "referenceSymbol", - "openValue" : 0.202532411323639305322785730822943150997161865234375, + "homeNotional24h" : 7.143538047012306, + "openValue" : 4.258773108174356281097061582840979099273681640625, "isInverse" : true, "lotSize" : 7.061401241503109105224211816675961017608642578125, "optionMultiplier" : 5.962133916683182, "openingTimestamp" : "2000-01-23T04:56:07.000+00:00", - "impactBidPrice" : 7.04836565559697, + "foreignNotional24h" : 0.8851374739011653, + "impactBidPrice" : 3.2588565619047607, "prevTotalVolume" : 1.2846590061165319429647979632136411964893341064453125, "initMargin" : 1.2315135367772556, "front" : "2000-01-23T04:56:07.000+00:00" }, { - "optionUnderlyingPrice" : 0.8774076871421566, + "optionUnderlyingPrice" : 0.5199002018724985, "deleverage" : true, "riskLimit" : 1.489415909854170383397331534069962799549102783203125, "fundingBaseSymbol" : "fundingBaseSymbol", - "prevPrice24h" : 7.143538047012306, - "highPrice" : 7.058770351582356, + "prevPrice24h" : 7.058770351582356, + "highPrice" : 0.10263654006109402, "fairMethod" : "fairMethod", "taxed" : true, "state" : "state", @@ -2056,14 +1890,14 @@

Example data

"publishTime" : "2000-01-23T04:56:07.000+00:00", "maintMargin" : 1.0246457001441578, "takerFee" : 4.965218492984954, - "fairBasis" : 4.258773108174356, + "fairBasis" : 4.678947989005849, "volume24h" : 6.87805222012787620400331434211693704128265380859375, "underlying" : "underlying", "quoteToSettleMultiplier" : 7.3862819483858839220147274318151175975799560546875, "fundingQuoteSymbol" : "fundingQuoteSymbol", "quoteCurrency" : "quoteCurrency", - "indicativeSettlePrice" : 9.132027271330688, - "settledPrice" : 9.702963800023566, + "indicativeSettlePrice" : 9.702963800023566, + "settledPrice" : 7.933506881737151, "relistInterval" : "2000-01-23T04:56:07.000+00:00", "prevClosePrice" : 8.762042012749001, "maxPrice" : 2.3021358869347655, @@ -2071,7 +1905,7 @@

Example data

"settle" : "2000-01-23T04:56:07.000+00:00", "buyLeg" : "buyLeg", "tickSize" : 9.301444243932576, - "markPrice" : 4.678947989005849, + "markPrice" : 9.132027271330688, "settlCurrency" : "settlCurrency", "listing" : "2000-01-23T04:56:07.000+00:00", "indicativeFundingRate" : 6.683562403749608, @@ -2080,20 +1914,20 @@

Example data

"limitDownPrice" : 9.018348186070783, "lastTickDirection" : "lastTickDirection", "rebalanceTimestamp" : "2000-01-23T04:56:07.000+00:00", - "fairBasisRate" : 6.628464275087742, - "lastPriceProtected" : 4.652396432933246, - "midPrice" : 3.0205796992916243, + "fairBasisRate" : 1.041444916118296, + "lastPriceProtected" : 7.740351818741173, + "midPrice" : 7.04836565559697, "insuranceFee" : 9.965781217890562, "optionStrikePrice" : 1.4658129805029452, "limitUpPrice" : 6.438423552598547, "bankruptLimitUpPrice" : 6.965117697638846, "rebalanceInterval" : "2000-01-23T04:56:07.000+00:00", "fundingRate" : 9.369310271410669, - "lastPrice" : 0.10263654006109402, + "lastPrice" : 8.969578798196912, "totalVolume" : 2.884162126668780246063761296682059764862060546875, "symbol" : "symbol", "capped" : true, - "vwap" : 0.8851374739011653, + "vwap" : 6.519180951018382, "closingTimestamp" : "2000-01-23T04:56:07.000+00:00", "typ" : "typ", "inverseLeg" : "inverseLeg", @@ -2101,22 +1935,22 @@

Example data

"prevTotalTurnover" : 5.94489560761401580890606055618263781070709228515625, "limit" : 7.457744773683766, "calcInterval" : "2000-01-23T04:56:07.000+00:00", - "lastChangePcnt" : 8.969578798196912, - "askPrice" : 3.0576100241049344, + "lastChangePcnt" : 3.0205796992916243, + "askPrice" : 5.533258397034986, "multiplier" : 3.61607674925191080461672754609026014804840087890625, - "indicativeTaxRate" : 7.260521264802104, + "indicativeTaxRate" : 0.8774076871421566, "settlementFee" : 5.025004791520295, "totalTurnover" : 6.70401929795003592715829654480330646038055419921875, "turnover24h" : 3.093745262666447448651751983561553061008453369140625, - "fairPrice" : 1.041444916118296, - "bidPrice" : 7.740351818741173, + "fairPrice" : 7.260521264802104, + "bidPrice" : 3.0576100241049344, "volume" : 6.77832496304801335185175048536621034145355224609375, - "impactMidPrice" : 5.533258397034986, + "impactMidPrice" : 4.078845849666752, "sellLeg" : "sellLeg", "optionStrikePcnt" : 0.8008281904610115, "maxOrderQty" : 5.63737665663332876420099637471139430999755859375, "hasLiquidity" : true, - "openInterest" : 4.078845849666752343409825698472559452056884765625, + "openInterest" : 6.6284642750877420525057459599338471889495849609375, "riskStep" : 6.8468526983526398765889098285697400569915771484375, "optionStrikeRound" : 6.027456183070403, "isQuanto" : true, @@ -2125,20 +1959,22 @@

Example data

"underlyingSymbol" : "underlyingSymbol", "fundingTimestamp" : "2000-01-23T04:56:07.000+00:00", "makerFee" : 1.1730742509559433, - "lowPrice" : 6.519180951018382, + "lowPrice" : 4.652396432933246, "underlyingToSettleMultiplier" : 4.1456080298839363962315474054776132106781005859375, "sessionInterval" : "2000-01-23T04:56:07.000+00:00", "fundingInterval" : "2000-01-23T04:56:07.000+00:00", "bankruptLimitDownPrice" : 3.5571952270680973, "turnover" : 3.35319334701124294184637619764544069766998291015625, - "impactAskPrice" : 3.2588565619047607, + "impactAskPrice" : 0.2025324113236393, "referenceSymbol" : "referenceSymbol", - "openValue" : 0.202532411323639305322785730822943150997161865234375, + "homeNotional24h" : 7.143538047012306, + "openValue" : 4.258773108174356281097061582840979099273681640625, "isInverse" : true, "lotSize" : 7.061401241503109105224211816675961017608642578125, "optionMultiplier" : 5.962133916683182, "openingTimestamp" : "2000-01-23T04:56:07.000+00:00", - "impactBidPrice" : 7.04836565559697, + "foreignNotional24h" : 0.8851374739011653, + "impactBidPrice" : 3.2588565619047607, "prevTotalVolume" : 1.2846590061165319429647979632136411964893341064453125, "initMargin" : 1.2315135367772556, "front" : "2000-01-23T04:56:07.000+00:00" @@ -2165,6 +2001,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -2200,12 +2039,12 @@

Return type

Example data

Content-Type: application/json
[ {
-  "optionUnderlyingPrice" : 0.8774076871421566,
+  "optionUnderlyingPrice" : 0.5199002018724985,
   "deleverage" : true,
   "riskLimit" : 1.489415909854170383397331534069962799549102783203125,
   "fundingBaseSymbol" : "fundingBaseSymbol",
-  "prevPrice24h" : 7.143538047012306,
-  "highPrice" : 7.058770351582356,
+  "prevPrice24h" : 7.058770351582356,
+  "highPrice" : 0.10263654006109402,
   "fairMethod" : "fairMethod",
   "taxed" : true,
   "state" : "state",
@@ -2215,14 +2054,14 @@ 

Example data

"publishTime" : "2000-01-23T04:56:07.000+00:00", "maintMargin" : 1.0246457001441578, "takerFee" : 4.965218492984954, - "fairBasis" : 4.258773108174356, + "fairBasis" : 4.678947989005849, "volume24h" : 6.87805222012787620400331434211693704128265380859375, "underlying" : "underlying", "quoteToSettleMultiplier" : 7.3862819483858839220147274318151175975799560546875, "fundingQuoteSymbol" : "fundingQuoteSymbol", "quoteCurrency" : "quoteCurrency", - "indicativeSettlePrice" : 9.132027271330688, - "settledPrice" : 9.702963800023566, + "indicativeSettlePrice" : 9.702963800023566, + "settledPrice" : 7.933506881737151, "relistInterval" : "2000-01-23T04:56:07.000+00:00", "prevClosePrice" : 8.762042012749001, "maxPrice" : 2.3021358869347655, @@ -2230,7 +2069,7 @@

Example data

"settle" : "2000-01-23T04:56:07.000+00:00", "buyLeg" : "buyLeg", "tickSize" : 9.301444243932576, - "markPrice" : 4.678947989005849, + "markPrice" : 9.132027271330688, "settlCurrency" : "settlCurrency", "listing" : "2000-01-23T04:56:07.000+00:00", "indicativeFundingRate" : 6.683562403749608, @@ -2239,20 +2078,20 @@

Example data

"limitDownPrice" : 9.018348186070783, "lastTickDirection" : "lastTickDirection", "rebalanceTimestamp" : "2000-01-23T04:56:07.000+00:00", - "fairBasisRate" : 6.628464275087742, - "lastPriceProtected" : 4.652396432933246, - "midPrice" : 3.0205796992916243, + "fairBasisRate" : 1.041444916118296, + "lastPriceProtected" : 7.740351818741173, + "midPrice" : 7.04836565559697, "insuranceFee" : 9.965781217890562, "optionStrikePrice" : 1.4658129805029452, "limitUpPrice" : 6.438423552598547, "bankruptLimitUpPrice" : 6.965117697638846, "rebalanceInterval" : "2000-01-23T04:56:07.000+00:00", "fundingRate" : 9.369310271410669, - "lastPrice" : 0.10263654006109402, + "lastPrice" : 8.969578798196912, "totalVolume" : 2.884162126668780246063761296682059764862060546875, "symbol" : "symbol", "capped" : true, - "vwap" : 0.8851374739011653, + "vwap" : 6.519180951018382, "closingTimestamp" : "2000-01-23T04:56:07.000+00:00", "typ" : "typ", "inverseLeg" : "inverseLeg", @@ -2260,22 +2099,22 @@

Example data

"prevTotalTurnover" : 5.94489560761401580890606055618263781070709228515625, "limit" : 7.457744773683766, "calcInterval" : "2000-01-23T04:56:07.000+00:00", - "lastChangePcnt" : 8.969578798196912, - "askPrice" : 3.0576100241049344, + "lastChangePcnt" : 3.0205796992916243, + "askPrice" : 5.533258397034986, "multiplier" : 3.61607674925191080461672754609026014804840087890625, - "indicativeTaxRate" : 7.260521264802104, + "indicativeTaxRate" : 0.8774076871421566, "settlementFee" : 5.025004791520295, "totalTurnover" : 6.70401929795003592715829654480330646038055419921875, "turnover24h" : 3.093745262666447448651751983561553061008453369140625, - "fairPrice" : 1.041444916118296, - "bidPrice" : 7.740351818741173, + "fairPrice" : 7.260521264802104, + "bidPrice" : 3.0576100241049344, "volume" : 6.77832496304801335185175048536621034145355224609375, - "impactMidPrice" : 5.533258397034986, + "impactMidPrice" : 4.078845849666752, "sellLeg" : "sellLeg", "optionStrikePcnt" : 0.8008281904610115, "maxOrderQty" : 5.63737665663332876420099637471139430999755859375, "hasLiquidity" : true, - "openInterest" : 4.078845849666752343409825698472559452056884765625, + "openInterest" : 6.6284642750877420525057459599338471889495849609375, "riskStep" : 6.8468526983526398765889098285697400569915771484375, "optionStrikeRound" : 6.027456183070403, "isQuanto" : true, @@ -2284,30 +2123,32 @@

Example data

"underlyingSymbol" : "underlyingSymbol", "fundingTimestamp" : "2000-01-23T04:56:07.000+00:00", "makerFee" : 1.1730742509559433, - "lowPrice" : 6.519180951018382, + "lowPrice" : 4.652396432933246, "underlyingToSettleMultiplier" : 4.1456080298839363962315474054776132106781005859375, "sessionInterval" : "2000-01-23T04:56:07.000+00:00", "fundingInterval" : "2000-01-23T04:56:07.000+00:00", "bankruptLimitDownPrice" : 3.5571952270680973, "turnover" : 3.35319334701124294184637619764544069766998291015625, - "impactAskPrice" : 3.2588565619047607, + "impactAskPrice" : 0.2025324113236393, "referenceSymbol" : "referenceSymbol", - "openValue" : 0.202532411323639305322785730822943150997161865234375, + "homeNotional24h" : 7.143538047012306, + "openValue" : 4.258773108174356281097061582840979099273681640625, "isInverse" : true, "lotSize" : 7.061401241503109105224211816675961017608642578125, "optionMultiplier" : 5.962133916683182, "openingTimestamp" : "2000-01-23T04:56:07.000+00:00", - "impactBidPrice" : 7.04836565559697, + "foreignNotional24h" : 0.8851374739011653, + "impactBidPrice" : 3.2588565619047607, "prevTotalVolume" : 1.2846590061165319429647979632136411964893341064453125, "initMargin" : 1.2315135367772556, "front" : "2000-01-23T04:56:07.000+00:00" }, { - "optionUnderlyingPrice" : 0.8774076871421566, + "optionUnderlyingPrice" : 0.5199002018724985, "deleverage" : true, "riskLimit" : 1.489415909854170383397331534069962799549102783203125, "fundingBaseSymbol" : "fundingBaseSymbol", - "prevPrice24h" : 7.143538047012306, - "highPrice" : 7.058770351582356, + "prevPrice24h" : 7.058770351582356, + "highPrice" : 0.10263654006109402, "fairMethod" : "fairMethod", "taxed" : true, "state" : "state", @@ -2317,14 +2158,14 @@

Example data

"publishTime" : "2000-01-23T04:56:07.000+00:00", "maintMargin" : 1.0246457001441578, "takerFee" : 4.965218492984954, - "fairBasis" : 4.258773108174356, + "fairBasis" : 4.678947989005849, "volume24h" : 6.87805222012787620400331434211693704128265380859375, "underlying" : "underlying", "quoteToSettleMultiplier" : 7.3862819483858839220147274318151175975799560546875, "fundingQuoteSymbol" : "fundingQuoteSymbol", "quoteCurrency" : "quoteCurrency", - "indicativeSettlePrice" : 9.132027271330688, - "settledPrice" : 9.702963800023566, + "indicativeSettlePrice" : 9.702963800023566, + "settledPrice" : 7.933506881737151, "relistInterval" : "2000-01-23T04:56:07.000+00:00", "prevClosePrice" : 8.762042012749001, "maxPrice" : 2.3021358869347655, @@ -2332,7 +2173,7 @@

Example data

"settle" : "2000-01-23T04:56:07.000+00:00", "buyLeg" : "buyLeg", "tickSize" : 9.301444243932576, - "markPrice" : 4.678947989005849, + "markPrice" : 9.132027271330688, "settlCurrency" : "settlCurrency", "listing" : "2000-01-23T04:56:07.000+00:00", "indicativeFundingRate" : 6.683562403749608, @@ -2341,20 +2182,20 @@

Example data

"limitDownPrice" : 9.018348186070783, "lastTickDirection" : "lastTickDirection", "rebalanceTimestamp" : "2000-01-23T04:56:07.000+00:00", - "fairBasisRate" : 6.628464275087742, - "lastPriceProtected" : 4.652396432933246, - "midPrice" : 3.0205796992916243, + "fairBasisRate" : 1.041444916118296, + "lastPriceProtected" : 7.740351818741173, + "midPrice" : 7.04836565559697, "insuranceFee" : 9.965781217890562, "optionStrikePrice" : 1.4658129805029452, "limitUpPrice" : 6.438423552598547, "bankruptLimitUpPrice" : 6.965117697638846, "rebalanceInterval" : "2000-01-23T04:56:07.000+00:00", "fundingRate" : 9.369310271410669, - "lastPrice" : 0.10263654006109402, + "lastPrice" : 8.969578798196912, "totalVolume" : 2.884162126668780246063761296682059764862060546875, "symbol" : "symbol", "capped" : true, - "vwap" : 0.8851374739011653, + "vwap" : 6.519180951018382, "closingTimestamp" : "2000-01-23T04:56:07.000+00:00", "typ" : "typ", "inverseLeg" : "inverseLeg", @@ -2362,22 +2203,22 @@

Example data

"prevTotalTurnover" : 5.94489560761401580890606055618263781070709228515625, "limit" : 7.457744773683766, "calcInterval" : "2000-01-23T04:56:07.000+00:00", - "lastChangePcnt" : 8.969578798196912, - "askPrice" : 3.0576100241049344, + "lastChangePcnt" : 3.0205796992916243, + "askPrice" : 5.533258397034986, "multiplier" : 3.61607674925191080461672754609026014804840087890625, - "indicativeTaxRate" : 7.260521264802104, + "indicativeTaxRate" : 0.8774076871421566, "settlementFee" : 5.025004791520295, "totalTurnover" : 6.70401929795003592715829654480330646038055419921875, "turnover24h" : 3.093745262666447448651751983561553061008453369140625, - "fairPrice" : 1.041444916118296, - "bidPrice" : 7.740351818741173, + "fairPrice" : 7.260521264802104, + "bidPrice" : 3.0576100241049344, "volume" : 6.77832496304801335185175048536621034145355224609375, - "impactMidPrice" : 5.533258397034986, + "impactMidPrice" : 4.078845849666752, "sellLeg" : "sellLeg", "optionStrikePcnt" : 0.8008281904610115, "maxOrderQty" : 5.63737665663332876420099637471139430999755859375, "hasLiquidity" : true, - "openInterest" : 4.078845849666752343409825698472559452056884765625, + "openInterest" : 6.6284642750877420525057459599338471889495849609375, "riskStep" : 6.8468526983526398765889098285697400569915771484375, "optionStrikeRound" : 6.027456183070403, "isQuanto" : true, @@ -2386,20 +2227,22 @@

Example data

"underlyingSymbol" : "underlyingSymbol", "fundingTimestamp" : "2000-01-23T04:56:07.000+00:00", "makerFee" : 1.1730742509559433, - "lowPrice" : 6.519180951018382, + "lowPrice" : 4.652396432933246, "underlyingToSettleMultiplier" : 4.1456080298839363962315474054776132106781005859375, "sessionInterval" : "2000-01-23T04:56:07.000+00:00", "fundingInterval" : "2000-01-23T04:56:07.000+00:00", "bankruptLimitDownPrice" : 3.5571952270680973, "turnover" : 3.35319334701124294184637619764544069766998291015625, - "impactAskPrice" : 3.2588565619047607, + "impactAskPrice" : 0.2025324113236393, "referenceSymbol" : "referenceSymbol", - "openValue" : 0.202532411323639305322785730822943150997161865234375, + "homeNotional24h" : 7.143538047012306, + "openValue" : 4.258773108174356281097061582840979099273681640625, "isInverse" : true, "lotSize" : 7.061401241503109105224211816675961017608642578125, "optionMultiplier" : 5.962133916683182, "openingTimestamp" : "2000-01-23T04:56:07.000+00:00", - "impactBidPrice" : 7.04836565559697, + "foreignNotional24h" : 0.8851374739011653, + "impactBidPrice" : 3.2588565619047607, "prevTotalVolume" : 1.2846590061165319429647979632136411964893341064453125, "initMargin" : 1.2315135367772556, "front" : "2000-01-23T04:56:07.000+00:00" @@ -2426,6 +2269,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -2436,7 +2282,7 @@

404

Up
get /instrument/activeIntervals
Return all active contract series and interval pairs. (instrument.getActiveIntervals)
-
This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as ["XBT:perpetual", "XBT:monthly", "XBT:quarterly", "ETH:monthly", ...]. These identifiers are usable in any query's symbol param. The second array is the current resolution of these intervals. Results are mapped at the same index.
+
This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as ["XBT:perpetual", "XBT:quarterly", "XBT:biquarterly", "ETH:quarterly", ...]. These identifiers are usable in any query's symbol param. The second array is the current resolution of these intervals. Results are mapped at the same index.

Consumes

@@ -2486,6 +2332,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -2514,9 +2363,7 @@

Consumes

Query parameters

-
account (optional)
- -
Query Parameter — format: double
symbol (optional)
+
symbol (optional)
Query Parameter — The composite index symbol. default: .XBT
filter (optional)
@@ -2587,6 +2434,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -2622,12 +2472,12 @@

Return type

Example data

Content-Type: application/json
[ {
-  "optionUnderlyingPrice" : 0.8774076871421566,
+  "optionUnderlyingPrice" : 0.5199002018724985,
   "deleverage" : true,
   "riskLimit" : 1.489415909854170383397331534069962799549102783203125,
   "fundingBaseSymbol" : "fundingBaseSymbol",
-  "prevPrice24h" : 7.143538047012306,
-  "highPrice" : 7.058770351582356,
+  "prevPrice24h" : 7.058770351582356,
+  "highPrice" : 0.10263654006109402,
   "fairMethod" : "fairMethod",
   "taxed" : true,
   "state" : "state",
@@ -2637,14 +2487,14 @@ 

Example data

"publishTime" : "2000-01-23T04:56:07.000+00:00", "maintMargin" : 1.0246457001441578, "takerFee" : 4.965218492984954, - "fairBasis" : 4.258773108174356, + "fairBasis" : 4.678947989005849, "volume24h" : 6.87805222012787620400331434211693704128265380859375, "underlying" : "underlying", "quoteToSettleMultiplier" : 7.3862819483858839220147274318151175975799560546875, "fundingQuoteSymbol" : "fundingQuoteSymbol", "quoteCurrency" : "quoteCurrency", - "indicativeSettlePrice" : 9.132027271330688, - "settledPrice" : 9.702963800023566, + "indicativeSettlePrice" : 9.702963800023566, + "settledPrice" : 7.933506881737151, "relistInterval" : "2000-01-23T04:56:07.000+00:00", "prevClosePrice" : 8.762042012749001, "maxPrice" : 2.3021358869347655, @@ -2652,7 +2502,7 @@

Example data

"settle" : "2000-01-23T04:56:07.000+00:00", "buyLeg" : "buyLeg", "tickSize" : 9.301444243932576, - "markPrice" : 4.678947989005849, + "markPrice" : 9.132027271330688, "settlCurrency" : "settlCurrency", "listing" : "2000-01-23T04:56:07.000+00:00", "indicativeFundingRate" : 6.683562403749608, @@ -2661,20 +2511,20 @@

Example data

"limitDownPrice" : 9.018348186070783, "lastTickDirection" : "lastTickDirection", "rebalanceTimestamp" : "2000-01-23T04:56:07.000+00:00", - "fairBasisRate" : 6.628464275087742, - "lastPriceProtected" : 4.652396432933246, - "midPrice" : 3.0205796992916243, + "fairBasisRate" : 1.041444916118296, + "lastPriceProtected" : 7.740351818741173, + "midPrice" : 7.04836565559697, "insuranceFee" : 9.965781217890562, "optionStrikePrice" : 1.4658129805029452, "limitUpPrice" : 6.438423552598547, "bankruptLimitUpPrice" : 6.965117697638846, "rebalanceInterval" : "2000-01-23T04:56:07.000+00:00", "fundingRate" : 9.369310271410669, - "lastPrice" : 0.10263654006109402, + "lastPrice" : 8.969578798196912, "totalVolume" : 2.884162126668780246063761296682059764862060546875, "symbol" : "symbol", "capped" : true, - "vwap" : 0.8851374739011653, + "vwap" : 6.519180951018382, "closingTimestamp" : "2000-01-23T04:56:07.000+00:00", "typ" : "typ", "inverseLeg" : "inverseLeg", @@ -2682,22 +2532,22 @@

Example data

"prevTotalTurnover" : 5.94489560761401580890606055618263781070709228515625, "limit" : 7.457744773683766, "calcInterval" : "2000-01-23T04:56:07.000+00:00", - "lastChangePcnt" : 8.969578798196912, - "askPrice" : 3.0576100241049344, + "lastChangePcnt" : 3.0205796992916243, + "askPrice" : 5.533258397034986, "multiplier" : 3.61607674925191080461672754609026014804840087890625, - "indicativeTaxRate" : 7.260521264802104, + "indicativeTaxRate" : 0.8774076871421566, "settlementFee" : 5.025004791520295, "totalTurnover" : 6.70401929795003592715829654480330646038055419921875, "turnover24h" : 3.093745262666447448651751983561553061008453369140625, - "fairPrice" : 1.041444916118296, - "bidPrice" : 7.740351818741173, + "fairPrice" : 7.260521264802104, + "bidPrice" : 3.0576100241049344, "volume" : 6.77832496304801335185175048536621034145355224609375, - "impactMidPrice" : 5.533258397034986, + "impactMidPrice" : 4.078845849666752, "sellLeg" : "sellLeg", "optionStrikePcnt" : 0.8008281904610115, "maxOrderQty" : 5.63737665663332876420099637471139430999755859375, "hasLiquidity" : true, - "openInterest" : 4.078845849666752343409825698472559452056884765625, + "openInterest" : 6.6284642750877420525057459599338471889495849609375, "riskStep" : 6.8468526983526398765889098285697400569915771484375, "optionStrikeRound" : 6.027456183070403, "isQuanto" : true, @@ -2706,30 +2556,32 @@

Example data

"underlyingSymbol" : "underlyingSymbol", "fundingTimestamp" : "2000-01-23T04:56:07.000+00:00", "makerFee" : 1.1730742509559433, - "lowPrice" : 6.519180951018382, + "lowPrice" : 4.652396432933246, "underlyingToSettleMultiplier" : 4.1456080298839363962315474054776132106781005859375, "sessionInterval" : "2000-01-23T04:56:07.000+00:00", "fundingInterval" : "2000-01-23T04:56:07.000+00:00", "bankruptLimitDownPrice" : 3.5571952270680973, "turnover" : 3.35319334701124294184637619764544069766998291015625, - "impactAskPrice" : 3.2588565619047607, + "impactAskPrice" : 0.2025324113236393, "referenceSymbol" : "referenceSymbol", - "openValue" : 0.202532411323639305322785730822943150997161865234375, + "homeNotional24h" : 7.143538047012306, + "openValue" : 4.258773108174356281097061582840979099273681640625, "isInverse" : true, "lotSize" : 7.061401241503109105224211816675961017608642578125, "optionMultiplier" : 5.962133916683182, "openingTimestamp" : "2000-01-23T04:56:07.000+00:00", - "impactBidPrice" : 7.04836565559697, + "foreignNotional24h" : 0.8851374739011653, + "impactBidPrice" : 3.2588565619047607, "prevTotalVolume" : 1.2846590061165319429647979632136411964893341064453125, "initMargin" : 1.2315135367772556, "front" : "2000-01-23T04:56:07.000+00:00" }, { - "optionUnderlyingPrice" : 0.8774076871421566, + "optionUnderlyingPrice" : 0.5199002018724985, "deleverage" : true, "riskLimit" : 1.489415909854170383397331534069962799549102783203125, "fundingBaseSymbol" : "fundingBaseSymbol", - "prevPrice24h" : 7.143538047012306, - "highPrice" : 7.058770351582356, + "prevPrice24h" : 7.058770351582356, + "highPrice" : 0.10263654006109402, "fairMethod" : "fairMethod", "taxed" : true, "state" : "state", @@ -2739,14 +2591,14 @@

Example data

"publishTime" : "2000-01-23T04:56:07.000+00:00", "maintMargin" : 1.0246457001441578, "takerFee" : 4.965218492984954, - "fairBasis" : 4.258773108174356, + "fairBasis" : 4.678947989005849, "volume24h" : 6.87805222012787620400331434211693704128265380859375, "underlying" : "underlying", "quoteToSettleMultiplier" : 7.3862819483858839220147274318151175975799560546875, "fundingQuoteSymbol" : "fundingQuoteSymbol", "quoteCurrency" : "quoteCurrency", - "indicativeSettlePrice" : 9.132027271330688, - "settledPrice" : 9.702963800023566, + "indicativeSettlePrice" : 9.702963800023566, + "settledPrice" : 7.933506881737151, "relistInterval" : "2000-01-23T04:56:07.000+00:00", "prevClosePrice" : 8.762042012749001, "maxPrice" : 2.3021358869347655, @@ -2754,7 +2606,7 @@

Example data

"settle" : "2000-01-23T04:56:07.000+00:00", "buyLeg" : "buyLeg", "tickSize" : 9.301444243932576, - "markPrice" : 4.678947989005849, + "markPrice" : 9.132027271330688, "settlCurrency" : "settlCurrency", "listing" : "2000-01-23T04:56:07.000+00:00", "indicativeFundingRate" : 6.683562403749608, @@ -2763,20 +2615,20 @@

Example data

"limitDownPrice" : 9.018348186070783, "lastTickDirection" : "lastTickDirection", "rebalanceTimestamp" : "2000-01-23T04:56:07.000+00:00", - "fairBasisRate" : 6.628464275087742, - "lastPriceProtected" : 4.652396432933246, - "midPrice" : 3.0205796992916243, + "fairBasisRate" : 1.041444916118296, + "lastPriceProtected" : 7.740351818741173, + "midPrice" : 7.04836565559697, "insuranceFee" : 9.965781217890562, "optionStrikePrice" : 1.4658129805029452, "limitUpPrice" : 6.438423552598547, "bankruptLimitUpPrice" : 6.965117697638846, "rebalanceInterval" : "2000-01-23T04:56:07.000+00:00", "fundingRate" : 9.369310271410669, - "lastPrice" : 0.10263654006109402, + "lastPrice" : 8.969578798196912, "totalVolume" : 2.884162126668780246063761296682059764862060546875, "symbol" : "symbol", "capped" : true, - "vwap" : 0.8851374739011653, + "vwap" : 6.519180951018382, "closingTimestamp" : "2000-01-23T04:56:07.000+00:00", "typ" : "typ", "inverseLeg" : "inverseLeg", @@ -2784,22 +2636,22 @@

Example data

"prevTotalTurnover" : 5.94489560761401580890606055618263781070709228515625, "limit" : 7.457744773683766, "calcInterval" : "2000-01-23T04:56:07.000+00:00", - "lastChangePcnt" : 8.969578798196912, - "askPrice" : 3.0576100241049344, + "lastChangePcnt" : 3.0205796992916243, + "askPrice" : 5.533258397034986, "multiplier" : 3.61607674925191080461672754609026014804840087890625, - "indicativeTaxRate" : 7.260521264802104, + "indicativeTaxRate" : 0.8774076871421566, "settlementFee" : 5.025004791520295, "totalTurnover" : 6.70401929795003592715829654480330646038055419921875, "turnover24h" : 3.093745262666447448651751983561553061008453369140625, - "fairPrice" : 1.041444916118296, - "bidPrice" : 7.740351818741173, + "fairPrice" : 7.260521264802104, + "bidPrice" : 3.0576100241049344, "volume" : 6.77832496304801335185175048536621034145355224609375, - "impactMidPrice" : 5.533258397034986, + "impactMidPrice" : 4.078845849666752, "sellLeg" : "sellLeg", "optionStrikePcnt" : 0.8008281904610115, "maxOrderQty" : 5.63737665663332876420099637471139430999755859375, "hasLiquidity" : true, - "openInterest" : 4.078845849666752343409825698472559452056884765625, + "openInterest" : 6.6284642750877420525057459599338471889495849609375, "riskStep" : 6.8468526983526398765889098285697400569915771484375, "optionStrikeRound" : 6.027456183070403, "isQuanto" : true, @@ -2808,20 +2660,22 @@

Example data

"underlyingSymbol" : "underlyingSymbol", "fundingTimestamp" : "2000-01-23T04:56:07.000+00:00", "makerFee" : 1.1730742509559433, - "lowPrice" : 6.519180951018382, + "lowPrice" : 4.652396432933246, "underlyingToSettleMultiplier" : 4.1456080298839363962315474054776132106781005859375, "sessionInterval" : "2000-01-23T04:56:07.000+00:00", "fundingInterval" : "2000-01-23T04:56:07.000+00:00", "bankruptLimitDownPrice" : 3.5571952270680973, "turnover" : 3.35319334701124294184637619764544069766998291015625, - "impactAskPrice" : 3.2588565619047607, + "impactAskPrice" : 0.2025324113236393, "referenceSymbol" : "referenceSymbol", - "openValue" : 0.202532411323639305322785730822943150997161865234375, + "homeNotional24h" : 7.143538047012306, + "openValue" : 4.258773108174356281097061582840979099273681640625, "isInverse" : true, "lotSize" : 7.061401241503109105224211816675961017608642578125, "optionMultiplier" : 5.962133916683182, "openingTimestamp" : "2000-01-23T04:56:07.000+00:00", - "impactBidPrice" : 7.04836565559697, + "foreignNotional24h" : 0.8851374739011653, + "impactBidPrice" : 3.2588565619047607, "prevTotalVolume" : 1.2846590061165319429647979632136411964893341064453125, "initMargin" : 1.2315135367772556, "front" : "2000-01-23T04:56:07.000+00:00" @@ -2848,6 +2702,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -2875,8 +2732,8 @@

Query parameters

symbol (optional)
-
Query Parameter

Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

-

You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

+
Query Parameter

Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

+

You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

filter (optional)
Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
columns (optional)
@@ -2938,6 +2795,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3010,6 +2870,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3036,7 +2899,7 @@

Consumes

Return type

@@ -3062,13 +2925,16 @@

Produces

Responses

200

Request was successful - inline_response_200_1 + inline_response_200

400

Parameter Error Error

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3096,8 +2962,8 @@

Query parameters

symbol (optional)
-
Query Parameter

Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

-

You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

+
Query Parameter

Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

+

You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

filter (optional)
Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
columns (optional)
@@ -3121,105 +2987,25 @@

Query parameters

Return type

array[Liquidation] - -
- - - -

Example data

-
Content-Type: application/json
-
[ {
-  "symbol" : "symbol",
-  "side" : "side",
-  "orderID" : "orderID",
-  "price" : 0.8008281904610115,
-  "leavesQty" : 6.02745618307040320615897144307382404804229736328125
-}, {
-  "symbol" : "symbol",
-  "side" : "side",
-  "orderID" : "orderID",
-  "price" : 0.8008281904610115,
-  "leavesQty" : 6.02745618307040320615897144307382404804229736328125
-} ]
- -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    -
  • application/json
  • -
  • application/xml
  • -
  • text/xml
  • -
  • application/javascript
  • -
  • text/javascript
  • -
- -

Responses

-

200

- Request was successful - -

400

- Parameter Error - Error -

401

- Unauthorized - Error -

404

- Not Found - Error -
-
-

Notification

-
-
- Up -
get /notification
-
Get your current notifications. (notification.get)
-
This is an upcoming feature and currently does not return data.
- - -

Consumes

- This API call consumes the following media types via the Content-Type request header: -
    -
  • application/json
  • -
  • application/x-www-form-urlencoded
  • -
- - - - - -

Return type

-
- array[Notification] - -
- - - -

Example data

-
Content-Type: application/json
-
[ {
-  "date" : "2000-01-23T04:56:07.000+00:00",
-  "waitForVisibility" : true,
-  "closable" : true,
-  "sound" : "sound",
-  "id" : 0.80082819046101150206595775671303272247314453125,
-  "persist" : true,
-  "title" : "title",
-  "body" : "body",
-  "type" : "success",
-  "ttl" : 6.02745618307040320615897144307382404804229736328125
+      
+    
+ + + +

Example data

+
Content-Type: application/json
+
[ {
+  "symbol" : "symbol",
+  "side" : "side",
+  "orderID" : "orderID",
+  "price" : 0.8008281904610115,
+  "leavesQty" : 6.02745618307040320615897144307382404804229736328125
 }, {
-  "date" : "2000-01-23T04:56:07.000+00:00",
-  "waitForVisibility" : true,
-  "closable" : true,
-  "sound" : "sound",
-  "id" : 0.80082819046101150206595775671303272247314453125,
-  "persist" : true,
-  "title" : "title",
-  "body" : "body",
-  "type" : "success",
-  "ttl" : 6.02745618307040320615897144307382404804229736328125
+  "symbol" : "symbol",
+  "side" : "side",
+  "orderID" : "orderID",
+  "price" : 0.8008281904610115,
+  "leavesQty" : 6.02745618307040320615897144307382404804229736328125
 } ]

Produces

@@ -3243,6 +3029,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3262,8 +3051,6 @@

Order

A leavesQty can be used to make a "Filled" order live again, if it is received within 60 seconds of the fill.

-

Use the simpleOrderQty and simpleLeavesQty fields to specify order size in Bitcoin, rather than contracts. -These fields will round up to the nearest contract.

Like order placement, amending can be done in bulk. Simply send a request to PUT /api/v1/order/bulk with a JSON body of the shape: {"orders": [{...}, {...}]}, each object containing the fields used in this endpoint.

@@ -3289,11 +3076,11 @@

Form parameters

Form Parameter — Optional new Client Order ID, requires origClOrdID.
simpleOrderQty (optional)
-
Form Parameter — Optional order quantity in units of the underlying instrument (i.e. Bitcoin). format: double
orderQty (optional)
+
Form Parameter — Deprecated: simple orders are not supported after 2018/10/26 format: double
orderQty (optional)
Form Parameter — Optional order quantity in units of the instrument (i.e. contracts). format: int32
simpleLeavesQty (optional)
-
Form Parameter — Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders. format: double
leavesQty (optional)
+
Form Parameter — Deprecated: simple orders are not supported after 2018/10/26 format: double
leavesQty (optional)
Form Parameter — Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders. format: int32
price (optional)
@@ -3373,6 +3160,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3504,6 +3294,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3639,6 +3432,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3774,6 +3570,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3842,6 +3641,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3941,6 +3743,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -3969,8 +3774,8 @@

Query parameters

symbol (optional)
-
Query Parameter

Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

-

You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

+
Query Parameter

Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

+

You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

filter (optional)
Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
columns (optional)
@@ -4092,6 +3897,9 @@

400

401

Unauthorized Error +

403

+ Access Denied + Error

404

Not Found Error @@ -4111,11 +3919,6 @@

Order Types

  • Limit: The default order type. Specify an orderQty and price.
  • Market: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at which point it will cancel.
  • -
  • MarketWithLeftOverAsLimit: A market order that, after eating through the order book as far as -permitted by available margin, will become a limit order. The difference between this type and Market only -affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over, -a Market order will cancel the remaining quantity. MarketWithLeftOverAsLimit will keep the remaining -quantity in the books as a Limit.
  • Stop: A Stop Market order. Specify an orderQty and stopPx. When the stopPx is reached, the order will be entered into the book.
      @@ -4135,12 +3938,11 @@

      Execution Instructions

      • ParticipateDoNotInitiate: Also known as a Post-Only order. If this order would have executed on placement, it will cancel instead.
      • -
      • AllOrNone: Valid only for hidden orders (displayQty: 0). Use to only execute if the entire order would fill.
      • MarkPrice, LastPrice, IndexPrice: Used by stop and if-touched orders to determine the triggering price. Use only one. By default, 'MarkPrice' is used. Also used for Pegged orders to define the value of 'LastPeg'.
      • ReduceOnly: A 'ReduceOnly' order can only reduce your position, not increase it. If you have a 'ReduceOnly' limit order that rests in the order book while the position is reduced by other orders, then its order quantity will -be amended down or canceled. If there are multiple 'ReduceOnly' orders the least agresssive will be amended first.
      • +be amended down or canceled. If there are multiple 'ReduceOnly' orders the least aggressive will be amended first.
      • Close: 'Close' implies 'ReduceOnly'. A 'Close' order will cancel other active limit orders with the same side and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a 'Close' Stop is ensured to have the margin required to execute, and can only execute up to the full size of your @@ -4152,23 +3954,7 @@

        Execution Instructions

      Linked Orders

      -

      Linked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing. -Please follow this document carefully and use the Testnet Exchange while developing.

      -

      BitMEX offers four advanced Linked Order types:

      -
        -
      • OCO: One Cancels the Other. A very flexible version of the standard Stop / Take Profit technique. -Multiple orders may be linked together using a single clOrdLinkID. Send a contingencyType of -OneCancelsTheOther on the orders. The first order that fully or partially executes (or activates -for Stop orders) will cancel all other orders with the same clOrdLinkID.
      • -
      • OTO: One Triggers the Other. Send a contingencyType of 'OneTriggersTheOther' on the primary order and -then subsequent orders with the same clOrdLinkID will be not be triggered until the primary order fully executes.
      • -
      • OUOA: One Updates the Other Absolute. Send a contingencyType of 'OneUpdatesTheOtherAbsolute' on the orders. Then -as one order has a execution, other orders with the same clOrdLinkID will have their order quantity amended -down by the execution quantity.
      • -
      • OUOP: One Updates the Other Proportional. Send a contingencyType of 'OneUpdatesTheOtherProportional' on the orders. Then -as one order has a execution, other orders with the same clOrdLinkID will have their order quantity reduced proportionally -by the fill percentage.
      • -
      +

      Linked Orders are deprecated as of 2018/11/10

      Trailing Stops

      You may use pegPriceType of 'TrailingStopPeg' to create Trailing Stops. The pegged stopPx will move as the market moves away from the peg, and freeze as the market moves toward it.

      @@ -4176,8 +3962,7 @@

      Trailing Stops

      specified in the execInst (default 'MarkPrice'). Use a negative offset for stop-sell and buy-if-touched orders.

      Requires ordType: 'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'.

      Simple Quantities

      -

      Send a simpleOrderQty instead of an orderQty to create an order denominated in the underlying currency. -This is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is.

      +

      Simple Quantities are deprecated as of 2018/10/26

      Rate Limits

      See the Bulk Order Documentation if you need to place multiple orders at the same time. Bulk orders require fewer risk checks in the trading engine and thus are ratelimited at 1/10 the normal rate.

      @@ -4212,9 +3997,9 @@

      Form parameters

      Form Parameter — Instrument symbol. e.g. 'XBTUSD'.
      side (optional)
      -
      Form Parameter — Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless orderQty or simpleOrderQty is negative.
      simpleOrderQty (optional)
      +
      Form Parameter — Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless orderQty is negative.
      simpleOrderQty (optional)
      -
      Form Parameter — Order quantity in units of the underlying instrument (i.e. Bitcoin). format: double
      orderQty (optional)
      +
      Form Parameter — Deprecated: simple orders are not supported after 2018/10/26 format: double
      orderQty (optional)
      Form Parameter — Order quantity in units of the instrument (i.e. contracts). format: int32
      price (optional)
      @@ -4226,19 +4011,19 @@

      Form parameters

      Form Parameter — Optional Client Order ID. This clOrdID will come back on the order and any related executions.
      clOrdLinkID (optional)
      -
      Form Parameter — Optional Client Order Link ID for contingent orders.
      pegOffsetValue (optional)
      +
      Form Parameter — Deprecated: linked orders are not supported after 2018/11/10.
      pegOffsetValue (optional)
      Form Parameter — Optional trailing offset from the current price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders. format: double
      pegPriceType (optional)
      Form Parameter — Optional peg price type. Valid options: LastPeg, MidPricePeg, MarketPeg, PrimaryPeg, TrailingStopPeg.
      ordType (optional)
      -
      Form Parameter — Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when price is specified. Defaults to 'Stop' when stopPx is specified. Defaults to 'StopLimit' when price and stopPx are specified. default: Limit
      timeInForce (optional)
      +
      Form Parameter — Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when price is specified. Defaults to 'Stop' when stopPx is specified. Defaults to 'StopLimit' when price and stopPx are specified. default: Limit
      timeInForce (optional)
      -
      Form Parameter — Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders.
      execInst (optional)
      +
      Form Parameter — Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders.
      execInst (optional)
      Form Parameter — Optional execution instructions. Valid options: ParticipateDoNotInitiate, AllOrNone, MarkPrice, IndexPrice, LastPrice, Close, ReduceOnly, Fixed. 'AllOrNone' instruction requires displayQty to be 0. 'MarkPrice', 'IndexPrice' or 'LastPrice' instruction valid for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders.
      contingencyType (optional)
      -
      Form Parameter — Optional contingency type for use with clOrdLinkID. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional.
      text (optional)
      +
      Form Parameter — Deprecated: linked orders are not supported after 2018/11/10.
      text (optional)
      Form Parameter — Optional order annotation. e.g. 'Take profit'.
  • @@ -4310,6 +4095,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -4320,7 +4108,7 @@

    404

    Up
    post /order/bulk
    Create multiple new orders for the same symbol. (order.newBulk)
    -

    This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged.

    +

    This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged.

    Each individual order object in the array should have the same properties as an individual POST /order call.

    This endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX systems, this endpoint is ratelimited at ceil(0.1 * orders). Submitting 10 orders via a bulk order call @@ -4447,6 +4235,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -4525,6 +4316,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -4536,7 +4330,41 @@

    Position

    Up
    get /position
    Get your positions. (position.get)
    -
    See the FIX Spec for explanations of these fields.
    +

    This endpoint is used for retrieving position information. The fields largely follow the FIX spec definitions. Some selected fields are explained in more detail below.

    +

    The fields account, symbol, currency are unique to each position and form its key.

    +
      +
    • account: Your unique account ID.
    • +
    • symbol: The contract for this position.
    • +
    • currency: The margin currency for this position.
    • +
    • underlying: Meta data of the symbol.
    • +
    • quoteCurrency: Meta data of the symbol, All prices are in the quoteCurrency
    • +
    • commission: The maximum of the maker, taker, and settlement fee.
    • +
    • initMarginReq: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage.
    • +
    • maintMarginReq: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit.
    • +
    • riskLimit: This is a function of your maintMarginReq.
    • +
    • leverage: 1 / initMarginReq.
    • +
    • crossMargin: True/false depending on whether you set cross margin on this position.
    • +
    • deleveragePercentile: Indicates where your position is in the ADL queue.
    • +
    • rebalancedPnl: The value of realised PNL that has transferred to your wallet for this position.
    • +
    • prevRealisedPnl: The value of realised PNL that has transferred to your wallet for this position since the position was closed.
    • +
    • currentQty: The current position amount in contracts.
    • +
    • currentCost: The current cost of the position in the settlement currency of the symbol (currency).
    • +
    • currentComm: The current commission of the position in the settlement currency of the symbol (currency).
    • +
    • realisedCost: The realised cost of this position calculated with regard to average cost accounting.
    • +
    • unrealisedCost: currentCost - realisedCost.
    • +
    • grossOpenCost: The absolute value of your open orders for this symbol.
    • +
    • grossOpenPremium: The amount your bidding above the mark price in the settlement currency of the symbol (currency).
    • +
    • markPrice: The mark price of the symbol in quoteCurrency.
    • +
    • markValue: The currentQty at the mark price in the settlement currency of the symbol (currency).
    • +
    • homeNotional: Value of position in units of underlying.
    • +
    • foreignNotional: Value of position in units of quoteCurrency.
    • +
    • realisedPnl: The negative of realisedCost.
    • +
    • unrealisedGrossPnl: markValue - unrealisedCost.
    • +
    • unrealisedPnl: unrealisedGrossPnl.
    • +
    • liquidationPrice: Once markPrice reaches this price, this position will be liquidated.
    • +
    • bankruptPrice: Once markPrice reaches this price, this position will have no equity.
    • +
    +

    Consumes

    @@ -4777,6 +4605,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -4934,6 +4765,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5091,6 +4925,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5248,6 +5085,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5405,6 +5245,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5432,8 +5275,8 @@

    Query parameters

    symbol (optional)
    -
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

    -

    You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

    +
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

    +

    You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

    filter (optional)
    Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
    columns (optional)
    @@ -5501,6 +5344,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5511,7 +5357,7 @@

    404

    Up
    get /quote/bucketed
    Get previous quotes in time buckets. (quote.getBucketed)
    -
    +
    Timestamps returned by our bucketed endpoints are the end of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint.

    Consumes

    @@ -5531,8 +5377,8 @@

    Query parameters

    Query Parameter — If true, will send in-progress (incomplete) bins for the current time period. default: false
    symbol (optional)
    -
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

    -

    You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

    +
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

    +

    You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

    filter (optional)
    Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
    columns (optional)
    @@ -5600,6 +5446,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5664,6 +5513,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5721,6 +5573,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5748,8 +5603,8 @@

    Query parameters

    symbol (optional)
    -
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

    -

    You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

    +
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

    +

    You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

    filter (optional)
    Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
    columns (optional)
    @@ -5823,6 +5678,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5895,6 +5753,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -5964,6 +5825,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -6035,6 +5899,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -6064,8 +5931,8 @@

    Query parameters

    symbol (optional)
    -
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

    -

    You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

    +
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

    +

    You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

    filter (optional)
    Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
    columns (optional)
    @@ -6141,6 +6008,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -6151,7 +6021,9 @@

    404

    Up
    get /trade/bucketed
    Get previous trades in time buckets. (trade.getBucketed)
    -
    +

    Timestamps returned by our bucketed endpoints are the end of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint.

    +

    Also note the open price is equal to the close price of the previous timeframe bucket.

    +

    Consumes

    @@ -6171,8 +6043,8 @@

    Query parameters

    Query Parameter — If true, will send in-progress (incomplete) bins for the current time period. default: false
    symbol (optional)
    -
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.

    -

    You can also send a timeframe, e.g. XBU:monthly. Timeframes are daily, weekly, monthly, quarterly, and biquarterly.

    +
    Query Parameter

    Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.

    +

    You can also send a timeframe, e.g. XBT:quarterly. Timeframes are nearest, daily, weekly, monthly, quarterly, biquarterly, and perpetual.

    filter (optional)
    Query Parameter — Generic table filter. Send JSON key/value pairs, such as {"key": "value"}. You can key on individual fields, and do more advanced querying on timestamps. See the Timestamp Docs for more details. format: JSON
    columns (optional)
    @@ -6254,6 +6126,9 @@

    400

    401

    Unauthorized Error +

    403

    + Access Denied + Error

    404

    Not Found Error @@ -6325,6 +6200,18 @@

    Responses

    200

    Request was successful Transaction +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    @@ -6332,7 +6219,7 @@

    200

    Up
    get /user/checkReferralCode
    Check if a referral code is valid. (user.checkReferralCode)
    -
    If the code is valid, responds with the referral code's discount (e.g. 0.1 for 10%). Otherwise, will return a 404.
    +
    If the code is valid, responds with the referral code's discount (e.g. 0.1 for 10%). Otherwise, will return a 404 or 451 if invalid.

    Consumes

    @@ -6379,13 +6266,25 @@

    Responses

    200

    Request was successful Double +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    post /user/confirmEmail
    -
    Confirm your email address with a token. (user.confirm)
    +
    post /user/communicationToken
    +
    Register your communication token for mobile clients (user.communicationToken)
    @@ -6403,12 +6302,14 @@

    Form parameters

    token (required)
    +
    Form Parameter
    platformAgent (required)
    +
    Form Parameter

    Return type

    @@ -6416,12 +6317,17 @@

    Return type

    Example data

    Content-Type: application/json
    -
    {
    -  "created" : "2000-01-23T04:56:07.000+00:00",
    +    
    [ {
    +  "channel" : "channel",
       "id" : "id",
    -  "ttl" : 0.8008281904610115,
    -  "userId" : 6.027456183070403
    -}
    + "userId" : 0.80082819046101150206595775671303272247314453125, + "deviceToken" : "deviceToken" +}, { + "channel" : "channel", + "id" : "id", + "userId" : 0.80082819046101150206595775671303272247314453125, + "deviceToken" : "deviceToken" +} ]

    Produces

    This API call produces the following media types according to the Accept request header; @@ -6437,14 +6343,26 @@

    Produces

    Responses

    200

    Request was successful - AccessToken + +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    post /user/confirmEnableTFA
    -
    Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. (user.confirmEnableTFA)
    +
    post /user/confirmEmail
    +
    Confirm your email address with a token. (user.confirm)
    @@ -6460,24 +6378,27 @@

    Consumes

    Form parameters

    -
    type (optional)
    - -
    Form Parameter — Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey'
    token (required)
    +
    token (required)
    -
    Form Parameter — Token from your selected TFA type.
    +
    Form Parameter

    Return type

    + AccessToken - Boolean

    Example data

    Content-Type: application/json
    -
    true
    +
    {
    +  "created" : "2000-01-23T04:56:07.000+00:00",
    +  "id" : "id",
    +  "ttl" : 0.8008281904610115,
    +  "userId" : 6.027456183070403
    +}

    Produces

    This API call produces the following media types according to the Accept request header; @@ -6493,7 +6414,19 @@

    Produces

    Responses

    200

    Request was successful - Boolean + AccessToken +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    -
    -
    - Up -
    post /user/disableTFA
    -
    Disable two-factor auth for this account. (user.disableTFA)
    -
    - - -

    Consumes

    - This API call consumes the following media types via the Content-Type request header: -
      -
    • application/json
    • -
    • application/x-www-form-urlencoded
    • -
    - - - - -

    Form parameters

    -
    -
    type (optional)
    - -
    Form Parameter — Two-factor auth type. Supported types: 'GA' (Google Authenticator)
    token (required)
    - -
    Form Parameter — Token from your selected TFA type.
    -
    - -

    Return type

    -
    - - Boolean -
    - - - -

    Example data

    -
    Content-Type: application/json
    -
    true
    - -

    Produces

    - This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
      -
    • application/json
    • -
    • application/xml
    • -
    • text/xml
    • -
    • application/javascript
    • -
    • text/javascript
    • -
    - -

    Responses

    -

    200

    - Request was successful - Boolean +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error


    +
    +
    +
    + Up +
    get /user/commission
    +
    Get your account's commission status. (user.getCommission)
    +
    + + +

    Consumes

    + This API call consumes the following media types via the Content-Type request header: +
      +
    • application/json
    • +
    • application/x-www-form-urlencoded
    • +
    + + + + + +

    Return type

    + + + + +

    Example data

    +
    Content-Type: application/json
    +
    { }
    + +

    Produces

    + This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
      +
    • application/json
    • +
    • application/xml
    • +
    • text/xml
    • +
    • application/javascript
    • +
    • text/javascript
    • +
    + +

    Responses

    +

    200

    + Request was successful + UserCommissionsBySymbol +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    get /user/commission
    -
    Get your account's commission status. (user.getCommission)
    +
    get /user/depositAddress
    +
    Get a deposit address. (user.getDepositAddress)
    @@ -6793,29 +6769,25 @@

    Consumes

    +

    Query parameters

    +
    +
    currency (optional)
    + +
    Query Parameter — default: XBt
    +

    Return type

    - array[UserCommission] + String

    Example data

    Content-Type: application/json
    -
    [ {
    -  "takerFee" : 6.027456183070403,
    -  "makerFee" : 0.8008281904610115,
    -  "settlementFee" : 1.4658129805029452,
    -  "maxFee" : 5.962133916683182
    -}, {
    -  "takerFee" : 6.027456183070403,
    -  "makerFee" : 0.8008281904610115,
    -  "settlementFee" : 1.4658129805029452,
    -  "maxFee" : 5.962133916683182
    -} ]
    +
    ""

    Produces

    This API call produces the following media types according to the Accept request header; @@ -6831,14 +6803,26 @@

    Produces

    Responses

    200

    Request was successful - + String +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    get /user/depositAddress
    -
    Get a deposit address. (user.getDepositAddress)
    +
    get /user/executionHistory
    +
    Get the execution history by day. (user.getExecutionHistory)
    @@ -6853,23 +6837,25 @@

    Consumes

    Query parameters

    -
    currency (optional)
    +
    symbol (required)
    -
    Query Parameter — default: XBt
    +
    Query Parameter — default: XBTUSD
    timestamp (required)
    + +
    Query Parameter — default: 2017-02-13T12:00:00.000Z format: date-time

    Return type

    - String + Object

    Example data

    Content-Type: application/json
    -
    ""
    +
    "{}"

    Produces

    This API call produces the following media types according to the Accept request header; @@ -6885,7 +6871,19 @@

    Produces

    Responses

    200

    Request was successful - String + Object +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    @@ -6982,13 +6980,25 @@

    Responses

    200

    Request was successful
    Margin +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    get /user/wallet
    -
    Get your current wallet information. (user.getWallet)
    +
    get /user/quoteFillRatio
    +
    Get 7 days worth of Quote Fill Ratio statistics. (user.getQuoteFillRatio)
    @@ -7001,17 +7011,11 @@

    Consumes

    -

    Query parameters

    -
    -
    currency (optional)
    - -
    Query Parameter — default: XBt
    -

    Return type

    @@ -7020,31 +7024,13 @@

    Return type

    Example data

    Content-Type: application/json
    {
    -  "deposited" : 7.3862819483858839220147274318151175975799560546875,
    -  "withdrawn" : 1.231513536777255612975068288506008684635162353515625,
    -  "deltaDeposited" : 7.061401241503109105224211816675961017608642578125,
    -  "prevWithdrawn" : 1.46581298050294517310021547018550336360931396484375,
    -  "deltaWithdrawn" : 9.301444243932575517419536481611430644989013671875,
    -  "currency" : "currency",
    -  "prevAmount" : 2.3021358869347654518833223846741020679473876953125,
    -  "withdrawalLock" : [ "withdrawalLock", "withdrawalLock" ],
    -  "addr" : "addr",
    -  "prevTimestamp" : "2000-01-23T04:56:07.000+00:00",
    -  "timestamp" : "2000-01-23T04:56:07.000+00:00",
    -  "transferOut" : 1.489415909854170383397331534069962799549102783203125,
    -  "deltaAmount" : 4.1456080298839363962315474054776132106781005859375,
    -  "amount" : 6.8468526983526398765889098285697400569915771484375,
    -  "pendingDebit" : 1.173074250955943309548956676735542714595794677734375,
    -  "confirmedDebit" : 4.9652184929849543237878606305457651615142822265625,
    -  "pendingCredit" : 7.4577447736837658709418974467553198337554931640625,
    -  "script" : "script",
    -  "prevTransferOut" : 5.63737665663332876420099637471139430999755859375,
    -  "deltaTransferOut" : 2.027123023002321833274663731572218239307403564453125,
    -  "deltaTransferIn" : 3.61607674925191080461672754609026014804840087890625,
    -  "transferIn" : 1.024645700144157789424070870154537260532379150390625,
    -  "prevDeposited" : 6.02745618307040320615897144307382404804229736328125,
    -  "prevTransferIn" : 5.962133916683182377482808078639209270477294921875,
    -  "account" : 0.80082819046101150206595775671303272247314453125
    +  "date" : "2000-01-23T04:56:07.000+00:00",
    +  "quoteCount" : 6.027456183070403,
    +  "quoteFillRatioMavg7" : 2.3021358869347655,
    +  "dealtMavg7" : 5.637376656633329,
    +  "account" : 0.8008281904610115,
    +  "dealtCount" : 1.4658129805029452,
    +  "quotesMavg7" : 5.962133916683182
     }

    Produces

    @@ -7061,14 +7047,26 @@

    Produces

    Responses

    200

    Request was successful - Wallet + QuoteFillRatio +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    get /user/walletHistory
    -
    Get a history of all of your wallet transactions (deposits, withdrawals, PNL). (user.getWalletHistory)
    +
    get /user/wallet
    +
    Get your current wallet information. (user.getWallet)
    @@ -7091,7 +7089,7 @@

    Query parameters

    Return type

    - array[Transaction] + Wallet
    @@ -7099,33 +7097,33 @@

    Return type

    Example data

    Content-Type: application/json
    -
    [ {
    -  "amount" : 6.02745618307040320615897144307382404804229736328125,
    -  "address" : "address",
    -  "transactType" : "transactType",
    -  "tx" : "tx",
    -  "transactID" : "transactID",
    -  "fee" : 1.46581298050294517310021547018550336360931396484375,
    -  "transactTime" : "2000-01-23T04:56:07.000+00:00",
    -  "currency" : "currency",
    -  "text" : "text",
    -  "account" : 0.80082819046101150206595775671303272247314453125,
    -  "transactStatus" : "transactStatus",
    -  "timestamp" : "2000-01-23T04:56:07.000+00:00"
    -}, {
    -  "amount" : 6.02745618307040320615897144307382404804229736328125,
    -  "address" : "address",
    -  "transactType" : "transactType",
    -  "tx" : "tx",
    -  "transactID" : "transactID",
    -  "fee" : 1.46581298050294517310021547018550336360931396484375,
    -  "transactTime" : "2000-01-23T04:56:07.000+00:00",
    +    
    {
    +  "deposited" : 7.3862819483858839220147274318151175975799560546875,
    +  "withdrawn" : 1.231513536777255612975068288506008684635162353515625,
    +  "deltaDeposited" : 7.061401241503109105224211816675961017608642578125,
    +  "prevWithdrawn" : 1.46581298050294517310021547018550336360931396484375,
    +  "deltaWithdrawn" : 9.301444243932575517419536481611430644989013671875,
       "currency" : "currency",
    -  "text" : "text",
    -  "account" : 0.80082819046101150206595775671303272247314453125,
    -  "transactStatus" : "transactStatus",
    -  "timestamp" : "2000-01-23T04:56:07.000+00:00"
    -} ]
    + "prevAmount" : 2.3021358869347654518833223846741020679473876953125, + "withdrawalLock" : [ "withdrawalLock", "withdrawalLock" ], + "addr" : "addr", + "prevTimestamp" : "2000-01-23T04:56:07.000+00:00", + "timestamp" : "2000-01-23T04:56:07.000+00:00", + "transferOut" : 1.489415909854170383397331534069962799549102783203125, + "deltaAmount" : 4.1456080298839363962315474054776132106781005859375, + "amount" : 6.8468526983526398765889098285697400569915771484375, + "pendingDebit" : 1.173074250955943309548956676735542714595794677734375, + "confirmedDebit" : 4.9652184929849543237878606305457651615142822265625, + "pendingCredit" : 7.4577447736837658709418974467553198337554931640625, + "script" : "script", + "prevTransferOut" : 5.63737665663332876420099637471139430999755859375, + "deltaTransferOut" : 2.027123023002321833274663731572218239307403564453125, + "deltaTransferIn" : 3.61607674925191080461672754609026014804840087890625, + "transferIn" : 1.024645700144157789424070870154537260532379150390625, + "prevDeposited" : 6.02745618307040320615897144307382404804229736328125, + "prevTransferIn" : 5.962133916683182377482808078639209270477294921875, + "account" : 0.80082819046101150206595775671303272247314453125 +}

    Produces

    This API call produces the following media types according to the Accept request header; @@ -7141,14 +7139,26 @@

    Produces

    Responses

    200

    Request was successful - + Wallet +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    get /user/walletSummary
    -
    Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). (user.getWalletSummary)
    +
    get /user/walletHistory
    +
    Get a history of all of your wallet transactions (deposits, withdrawals, PNL). (user.getWalletHistory)
    @@ -7165,7 +7175,11 @@

    Query parameters

    currency (optional)
    -
    Query Parameter — default: XBt
    +
    Query Parameter — default: XBt
    count (optional)
    + +
    Query Parameter — Number of results to fetch. default: 100 format: double
    start (optional)
    + +
    Query Parameter — Starting point for results. default: 0 format: double
    @@ -7222,13 +7236,25 @@

    Responses

    200

    Request was successful +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    post /user/logout
    -
    Log out of BitMEX. (user.logout)
    +
    get /user/walletSummary
    +
    Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). (user.getWalletSummary)
    @@ -7241,59 +7267,51 @@

    Consumes

    +

    Query parameters

    +
    +
    currency (optional)
    - - - - - -

    Produces

    - This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
      -
    • application/json
    • -
    • application/xml
    • -
    • text/xml
    • -
    • application/javascript
    • -
    • text/javascript
    • -
    - -

    Responses

    -

    200

    - Request was successful - -
    -
    -
    -
    - Up -
    post /user/logoutAll
    -
    Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. (user.logoutAll)
    -
    - - -

    Consumes

    - This API call consumes the following media types via the Content-Type request header: -
      -
    • application/json
    • -
    • application/x-www-form-urlencoded
    • -
    - - - +
    Query Parameter — default: XBt
    +

    Return type

    + array[Transaction] - Double

    Example data

    Content-Type: application/json
    -
    0.8008281904610115
    +
    [ {
    +  "amount" : 6.02745618307040320615897144307382404804229736328125,
    +  "address" : "address",
    +  "transactType" : "transactType",
    +  "tx" : "tx",
    +  "transactID" : "transactID",
    +  "fee" : 1.46581298050294517310021547018550336360931396484375,
    +  "transactTime" : "2000-01-23T04:56:07.000+00:00",
    +  "currency" : "currency",
    +  "text" : "text",
    +  "account" : 0.80082819046101150206595775671303272247314453125,
    +  "transactStatus" : "transactStatus",
    +  "timestamp" : "2000-01-23T04:56:07.000+00:00"
    +}, {
    +  "amount" : 6.02745618307040320615897144307382404804229736328125,
    +  "address" : "address",
    +  "transactType" : "transactType",
    +  "tx" : "tx",
    +  "transactID" : "transactID",
    +  "fee" : 1.46581298050294517310021547018550336360931396484375,
    +  "transactTime" : "2000-01-23T04:56:07.000+00:00",
    +  "currency" : "currency",
    +  "text" : "text",
    +  "account" : 0.80082819046101150206595775671303272247314453125,
    +  "transactStatus" : "transactStatus",
    +  "timestamp" : "2000-01-23T04:56:07.000+00:00"
    +} ]

    Produces

    This API call produces the following media types according to the Accept request header; @@ -7309,15 +7327,27 @@

    Produces

    Responses

    200

    Request was successful - Double + +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    get /user/minWithdrawalFee
    -
    Get the minimum withdrawal fee for a currency. (user.minWithdrawalFee)
    -
    This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency.
    +
    post /user/logout
    +
    Log out of BitMEX. (user.logout)
    +

    Consumes

    @@ -7329,25 +7359,11 @@

    Consumes

    -

    Query parameters

    -
    -
    currency (optional)
    - -
    Query Parameter — default: XBt
    -
    -

    Return type

    -
    - - Object -
    -

    Example data

    -
    Content-Type: application/json
    -
    "{}"

    Produces

    This API call produces the following media types according to the Accept request header; @@ -7363,15 +7379,27 @@

    Produces

    Responses

    200

    Request was successful - Object + +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    -
    +
    Up -
    post /user/requestEnableTFA
    -
    Get secret key for setting up two-factor auth. (user.requestEnableTFA)
    -
    Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled.
    +
    get /user/minWithdrawalFee
    +
    Get the minimum withdrawal fee for a currency. (user.minWithdrawalFee)
    +
    This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency.

    Consumes

    @@ -7383,25 +7411,25 @@

    Consumes

    - -

    Form parameters

    +

    Query parameters

    -
    type (optional)
    +
    currency (optional)
    -
    Form Parameter — Two-factor auth type. Supported types: 'GA' (Google Authenticator)
    +
    Query Parameter — default: XBt
    +

    Return type

    - Boolean + Object

    Example data

    Content-Type: application/json
    -
    true
    +
    "{}"

    Produces

    This API call produces the following media types according to the Accept request header; @@ -7417,7 +7445,19 @@

    Produces

    Responses

    200

    Request was successful - Boolean + Object +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    @@ -7425,7 +7465,7 @@

    200

    Up
    post /user/requestWithdrawal
    Request a withdrawal to an external wallet. (user.requestWithdrawal)
    -
    This will send a confirmation email to the email address on record, unless requested via an API Key with the withdraw permission.
    +
    This will send a confirmation email to the email address on record.

    Consumes

    @@ -7450,7 +7490,9 @@

    Form parameters

    Form Parameter — Destination Address.
    fee (optional)
    -
    Form Parameter — Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. format: double
    +
    Form Parameter — Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. format: double
    text (optional)
    + +
    Form Parameter — Optional annotation, e.g. 'Transfer to home wallet'.

    Return type

    @@ -7493,6 +7535,18 @@

    Responses

    200

    Request was successful Transaction +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error


    -
    +

    UserEvent

    +
    Up -
    put /user
    -
    Update your password, name, and other attributes. (user.update)
    +
    get /userEvent
    +
    Get your user events (userEvent.get)
    @@ -7613,31 +7681,19 @@

    Consumes

    - -

    Form parameters

    +

    Query parameters

    -
    firstname (optional)
    - -
    Form Parameter
    lastname (optional)
    - -
    Form Parameter
    oldPassword (optional)
    - -
    Form Parameter
    newPassword (optional)
    - -
    Form Parameter
    newPasswordConfirm (optional)
    - -
    Form Parameter
    username (optional)
    - -
    Form Parameter — Username can only be set once. To reset, email support.
    country (optional)
    +
    count (optional)
    -
    Form Parameter — Country of residence.
    pgpPubKey (optional)
    +
    Query Parameter — Number of results to fetch. default: 150 format: double
    startId (optional)
    -
    Form Parameter — PGP Public Key. If specified, automated emails will be sentwith this key.
    +
    Query Parameter — Cursor for pagination. format: double
    +

    Return type

    - User + array[UserEvent]
    @@ -7645,52 +7701,31 @@

    Return type

    Example data

    Content-Type: application/json
    -
    {
    +    
    [ {
       "geoipRegion" : "geoipRegion",
    -  "country" : "country",
    -  "firstname" : "firstname",
    -  "preferences" : {
    -    "hideNotifications" : [ "hideNotifications", "hideNotifications" ],
    -    "tickerGroup" : "tickerGroup",
    -    "animationsEnabled" : true,
    -    "alertOnLiquidations" : true,
    -    "locale" : "en-US",
    -    "hideConfirmDialogs" : [ "hideConfirmDialogs", "hideConfirmDialogs" ],
    -    "disableEmails" : [ "disableEmails", "disableEmails" ],
    -    "sounds" : [ "sounds", "sounds" ],
    -    "colorTheme" : "colorTheme",
    -    "currency" : "currency",
    -    "hideNameFromLeaderboard" : true,
    -    "tradeLayout" : "tradeLayout",
    -    "strictTimeout" : true,
    -    "orderBookBinning" : "{}",
    -    "debug" : true,
    -    "strictIPCheck" : false,
    -    "msgsSeen" : [ "msgsSeen", "msgsSeen" ],
    -    "orderControlsPlusMinus" : true,
    -    "hideConnectionModal" : true,
    -    "tickerPinned" : true,
    -    "hideFromLeaderboard" : false,
    -    "announcementsLastSeen" : "2000-01-23T04:56:07.000+00:00",
    -    "orderBookType" : "orderBookType",
    -    "orderClearImmediate" : false,
    -    "showLocaleNumbers" : true,
    -    "chatChannelID" : 1.4658129805029452
    -  },
    +  "geoipSubRegion" : "geoipSubRegion",
    +  "eventMeta" : "{}",
       "created" : "2000-01-23T04:56:07.000+00:00",
    -  "typ" : "typ",
    -  "ownerId" : 6.02745618307040320615897144307382404804229736328125,
    -  "affiliateID" : "affiliateID",
    -  "lastname" : "lastname",
    -  "geoipCountry" : "geoipCountry",
    -  "lastUpdated" : "2000-01-23T04:56:07.000+00:00",
    -  "phone" : "phone",
    -  "TFAEnabled" : "TFAEnabled",
    -  "id" : 0.80082819046101150206595775671303272247314453125,
    -  "email" : "email",
    -  "pgpPubKey" : "pgpPubKey",
    -  "username" : "username"
    -}
    + "ip" : "ip", + "id" : 0.8008281904610115, + "type" : "apiKeyCreated", + "userId" : 6.027456183070403, + "createdById" : 1.4658129805029452, + "status" : "success", + "geoipCountry" : "geoipCountry" +}, { + "geoipRegion" : "geoipRegion", + "geoipSubRegion" : "geoipSubRegion", + "eventMeta" : "{}", + "created" : "2000-01-23T04:56:07.000+00:00", + "ip" : "ip", + "id" : 0.8008281904610115, + "type" : "apiKeyCreated", + "userId" : 6.027456183070403, + "createdById" : 1.4658129805029452, + "status" : "success", + "geoipCountry" : "geoipCountry" +} ]

    Produces

    This API call produces the following media types according to the Accept request header; @@ -7706,7 +7741,19 @@

    Produces

    Responses

    200

    Request was successful - User + +

    400

    + Parameter Error + Error +

    401

    + Unauthorized + Error +

    403

    + Access Denied + Error +

    404

    + Not Found + Error

    @@ -7721,11 +7768,13 @@

    Table of Contents

  • Announcement -
  • Chat -
  • ChatChannel -
  • +
  • CommunicationToken -
  • ConnectedUsers -
  • Error -
  • Error_error -
  • Execution -
  • Funding -
  • +
  • GlobalNotification -
  • IndexComposite -
  • Instrument -
  • InstrumentInterval -
  • @@ -7733,11 +7782,11 @@

    Table of Contents

  • Leaderboard -
  • Liquidation -
  • Margin -
  • -
  • Notification -
  • Order -
  • OrderBookL2 -
  • Position -
  • Quote -
  • +
  • QuoteFillRatio -
  • Settlement -
  • Stats -
  • StatsHistory -
  • @@ -7746,11 +7795,11 @@

    Table of Contents

  • TradeBin -
  • Transaction -
  • User -
  • -
  • UserCommission -
  • +
  • UserCommissionsBySymbol -
  • +
  • UserEvent -
  • UserPreferences -
  • Wallet -
  • inline_response_200 -
  • -
  • inline_response_200_1 -
  • x-any -
  • @@ -7798,6 +7847,8 @@

    Affiliate - pendingPayout (optional)

    BigDecimal format: int64
    timestamp (optional)
    Date format: date-time
    referrerAccount (optional)
    Double format: double
    +
    referralDiscount (optional)
    Double format: double
    +
    affiliatePayout (optional)
    Double format: double
    @@ -7832,6 +7883,16 @@

    ChatChannel - name

    +
    +

    CommunicationToken - Up

    +
    User communication SNS token
    +
    +
    id
    +
    userId
    BigDecimal format: int32
    +
    deviceToken
    +
    channel
    +
    +
    Double format: double
    +
    +

    GlobalNotification - Up

    +
    Account Notifications
    +
    +
    id (optional)
    BigDecimal format: int32
    +
    date
    Date format: date-time
    +
    title
    +
    body
    +
    ttl
    BigDecimal format: int32
    +
    type (optional)
    +
    Enum:
    +
    success
    error
    info
    +
    closable (optional)
    +
    persist (optional)
    +
    waitForVisibility (optional)
    +
    sound (optional)
    +
    +
    BigDecimal format: int64
    turnover (optional)
    BigDecimal format: int64
    turnover24h (optional)
    BigDecimal format: int64
    +
    homeNotional24h (optional)
    Double format: double
    +
    foreignNotional24h (optional)
    Double format: double
    prevPrice24h (optional)
    Double format: double
    vwap (optional)
    Double format: double
    highPrice (optional)
    Double format: double
    @@ -8123,24 +8204,6 @@

    Margin - U
    commission (optional)
    Double format: double

    -
    -

    Notification - Up

    -
    Account Notifications
    -
    -
    id (optional)
    BigDecimal format: int32
    -
    date
    Date format: date-time
    -
    title
    -
    body
    -
    ttl
    BigDecimal format: int32
    -
    type (optional)
    -
    Enum:
    -
    success
    error
    info
    -
    closable (optional)
    -
    persist (optional)
    -
    waitForVisibility (optional)
    -
    sound (optional)
    -
    -

    Order - Up

    Placement, Cancellation, Amending, and History
    @@ -8300,6 +8363,19 @@

    Quote - Up<
    askSize (optional)
    BigDecimal format: int64

    +
    +

    QuoteFillRatio - Up

    +
    Daily Quote Fill Ratio Statistic
    +
    +
    date
    Date format: date-time
    +
    account (optional)
    Double format: double
    +
    quoteCount (optional)
    Double format: double
    +
    dealtCount (optional)
    Double format: double
    +
    quotesMavg7 (optional)
    Double format: double
    +
    dealtMavg7 (optional)
    Double format: double
    +
    quoteFillRatioMavg7 (optional)
    Double format: double
    +
    +

    Settlement - Up

    Historical Settlement Data
    @@ -8427,13 +8503,30 @@

    User - Up

    -

    UserCommission - Up

    +

    UserCommissionsBySymbol - Up

    -
    makerFee (optional)
    Double format: double
    -
    takerFee (optional)
    Double format: double
    -
    settlementFee (optional)
    Double format: double
    -
    maxFee (optional)
    Double format: double
    +
    +
    +
    +

    UserEvent - Up

    +
    User Events for auditing
    +
    +
    id (optional)
    Double format: double
    +
    type
    +
    Enum:
    +
    apiKeyCreated
    deleverageExecution
    depositConfirmed
    depositPending
    banZeroVolumeApiUser
    liquidationOrderPlaced
    login
    pgpMaskedEmail
    pgpTestEmail
    passwordChanged
    positionStateLiquidated
    positionStateWarning
    resetPasswordConfirmed
    resetPasswordRequest
    transferCanceled
    transferCompleted
    transferReceived
    transferRequested
    twoFactorDisabled
    twoFactorEnabled
    withdrawalCanceled
    withdrawalCompleted
    withdrawalConfirmed
    withdrawalRequested
    verify
    +
    status
    +
    Enum:
    +
    success
    failure
    +
    userId
    Double format: double
    +
    createdById
    Double format: double
    +
    ip (optional)
    +
    geoipCountry (optional)
    +
    geoipRegion (optional)
    +
    geoipSubRegion (optional)
    +
    eventMeta (optional)
    +
    created
    Date format: date-time
    debug (optional)
    disableEmails (optional)
    +
    disablePush (optional)
    hideConfirmDialogs (optional)
    hideConnectionModal (optional)
    hideFromLeaderboard (optional)
    @@ -8502,13 +8596,6 @@

    Wallet - U

    inline_response_200 - Up

    -
    -
    success (optional)
    -
    -
    -
    -

    inline_response_200_1 - Up

    -
    name (optional)
    diff --git a/swagger.json b/swagger.json index a8e8a2ce0..e486cd9b6 100644 --- a/swagger.json +++ b/swagger.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "BitMEX API", - "description": "## REST API for the BitMEX Trading Platform\n\n[View Changelog](/app/apiChangelog)\n\n\n\n#### Getting Started\n\nBase URI: [https://www.bitmex.com/api/v1](/api/v1)\n\n##### Fetching Data\n\nAll REST endpoints are documented below. You can try out any query right from this interface.\n\nMost table queries accept `count`, `start`, and `reverse` params. Set `reverse=true` to get rows newest-first.\n\nAdditional documentation regarding filters, timestamps, and authentication\nis available in [the main API documentation](/app/restAPI).\n\n*All* table data is available via the [Websocket](/app/wsAPI). We highly recommend using the socket if you want\nto have the quickest possible data without being subject to ratelimits.\n\n##### Return Types\n\nBy default, all data is returned as JSON. Send `?_format=csv` to get CSV data or `?_format=xml` to get XML data.\n\n##### Trade Data Queries\n\n*This is only a small subset of what is available, to get you started.*\n\nFill in the parameters and click the `Try it out!` button to try any of these queries.\n\n* [Pricing Data](#!/Quote/Quote_get)\n\n* [Trade Data](#!/Trade/Trade_get)\n\n* [OrderBook Data](#!/OrderBook/OrderBook_getL2)\n\n* [Settlement Data](#!/Settlement/Settlement_get)\n\n* [Exchange Statistics](#!/Stats/Stats_history)\n\nEvery function of the BitMEX.com platform is exposed here and documented. Many more functions are available.\n\n##### Swagger Specification\n\n[⇩ Download Swagger JSON](swagger.json)\n\n\n\n## All API Endpoints\n\nClick to expand a section.\n", + "description": "## REST API for the BitMEX Trading Platform\n\n[View Changelog](/app/apiChangelog)\n\n-\n\n#### Getting Started\n\nBase URI: [https://www.bitmex.com/api/v1](/api/v1)\n\n##### Fetching Data\n\nAll REST endpoints are documented below. You can try out any query right from this interface.\n\nMost table queries accept `count`, `start`, and `reverse` params. Set `reverse=true` to get rows newest-first.\n\nAdditional documentation regarding filters, timestamps, and authentication\nis available in [the main API documentation](/app/restAPI).\n\n_All_ table data is available via the [Websocket](/app/wsAPI). We highly recommend using the socket if you want\nto have the quickest possible data without being subject to ratelimits.\n\n##### Return Types\n\nBy default, all data is returned as JSON. Send `?_format=csv` to get CSV data or `?_format=xml` to get XML data.\n\n##### Trade Data Queries\n\n_This is only a small subset of what is available, to get you started._\n\nFill in the parameters and click the `Try it out!` button to try any of these queries.\n\n- [Pricing Data](#!/Quote/Quote_get)\n\n- [Trade Data](#!/Trade/Trade_get)\n\n- [OrderBook Data](#!/OrderBook/OrderBook_getL2)\n\n- [Settlement Data](#!/Settlement/Settlement_get)\n\n- [Exchange Statistics](#!/Stats/Stats_history)\n\nEvery function of the BitMEX.com platform is exposed here and documented. Many more functions are available.\n\n##### Swagger Specification\n\n[⇩ Download Swagger JSON](swagger.json)\n\n-\n\n## All API Endpoints\n\nClick to expand a section.\n", "termsOfService": "https://www.bitmex.com/app/terms", "contact": { "email": "support@bitmex.com" @@ -50,6 +50,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -91,78 +97,8 @@ "$ref": "#/definitions/Error" } }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/Error" - } - } - }, - "deprecated": false - } - }, - "/apiKey": { - "post": { - "tags": [ - "APIKey" - ], - "summary": "Create a new API Key.", - "description": "API Keys can only be created via the frontend.", - "operationId": "APIKey.new", - "parameters": [ - { - "name": "name", - "in": "formData", - "description": "Key name. This name is for reference only.", - "required": false, - "type": "string" - }, - { - "name": "cidr", - "in": "formData", - "description": "CIDR block to restrict this key to. To restrict to a single address, append \"/32\", e.g. 207.39.29.22/32. Leave blank or set to 0.0.0.0/0 to allow all IPs. Only one block may be set. More on CIDR blocks", - "required": false, - "type": "string" - }, - { - "name": "permissions", - "in": "formData", - "description": "Key Permissions. All keys can read margin and position data. Additional permissions must be added. Available: [\"order\", \"orderCancel\", \"withdraw\"].", - "required": false, - "type": "string", - "format": "JSON" - }, - { - "name": "enabled", - "in": "formData", - "description": "Set to true to enable this key on creation. Otherwise, it must be explicitly enabled via /apiKey/enable.", - "required": false, - "default": false, - "type": "boolean" - }, - { - "name": "token", - "in": "formData", - "description": "OTP Token (YubiKey, Google Authenticator)", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Request was successful", - "schema": { - "$ref": "#/definitions/APIKey" - } - }, - "400": { - "description": "Parameter Error", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Access Denied", "schema": { "$ref": "#/definitions/Error" } @@ -175,7 +111,9 @@ } }, "deprecated": false - }, + } + }, + "/apiKey": { "get": { "tags": [ "APIKey" @@ -214,140 +152,8 @@ "$ref": "#/definitions/Error" } }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/Error" - } - } - }, - "deprecated": false - }, - "delete": { - "tags": [ - "APIKey" - ], - "summary": "Remove an API Key.", - "operationId": "APIKey.remove", - "parameters": [ - { - "name": "apiKeyID", - "in": "formData", - "description": "API Key ID (public component).", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Request was successful", - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - } - } - } - }, - "400": { - "description": "Parameter Error", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/Error" - } - } - }, - "deprecated": false - } - }, - "/apiKey/disable": { - "post": { - "tags": [ - "APIKey" - ], - "summary": "Disable an API Key.", - "operationId": "APIKey.disable", - "parameters": [ - { - "name": "apiKeyID", - "in": "formData", - "description": "API Key ID (public component).", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Request was successful", - "schema": { - "$ref": "#/definitions/APIKey" - } - }, - "400": { - "description": "Parameter Error", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "404": { - "description": "Not Found", - "schema": { - "$ref": "#/definitions/Error" - } - } - }, - "deprecated": false - } - }, - "/apiKey/enable": { - "post": { - "tags": [ - "APIKey" - ], - "summary": "Enable an API Key.", - "operationId": "APIKey.enable", - "parameters": [ - { - "name": "apiKeyID", - "in": "formData", - "description": "API Key ID (public component).", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Request was successful", - "schema": { - "$ref": "#/definitions/APIKey" - } - }, - "400": { - "description": "Parameter Error", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Access Denied", "schema": { "$ref": "#/definitions/Error" } @@ -427,6 +233,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -479,6 +291,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -519,6 +337,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -558,6 +382,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -581,7 +411,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -666,6 +496,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -687,7 +523,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -772,6 +608,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -793,7 +635,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -878,6 +720,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -901,7 +749,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -986,6 +834,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1027,6 +881,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1068,6 +928,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1109,6 +975,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1126,7 +998,7 @@ "Instrument" ], "summary": "Return all active contract series and interval pairs.", - "description": "This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:monthly\", \"XBT:quarterly\", \"ETH:monthly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index.", + "description": "This endpoint is useful for determining which pairs are live. It returns two arrays of strings. The first is intervals, such as `[\"XBT:perpetual\", \"XBT:quarterly\", \"XBT:biquarterly\", \"ETH:quarterly\", ...]`. These identifiers are usable in any query's `symbol` param. The second array is the current resolution of these intervals. Results are mapped at the same index.", "operationId": "Instrument.getActiveIntervals", "parameters": [], "responses": { @@ -1148,6 +1020,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1168,13 +1046,6 @@ "description": "Composite indices are built from multiple external price sources.\n\nUse this endpoint to get the underlying prices of an index. For example, send a `symbol` of `.XBT` to\nget the ticks and weights of the constituent exchanges that build the \".XBT\" index.\n\nA tick with reference `\"BMI\"` and weight `null` is the composite index tick.\n", "operationId": "Instrument.getCompositeIndex", "parameters": [ - { - "name": "account", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, { "name": "symbol", "in": "query", @@ -1264,6 +1135,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1286,7 +1163,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -1371,6 +1248,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1421,6 +1304,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1464,6 +1353,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1485,7 +1380,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -1570,8 +1465,14 @@ "$ref": "#/definitions/Error" } }, - "404": { - "description": "Not Found", + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } @@ -1581,14 +1482,14 @@ "security": [] } }, - "/notification": { + "/globalNotification": { "get": { "tags": [ - "Notification" + "GlobalNotification" ], - "summary": "Get your current notifications.", + "summary": "Get your current GlobalNotifications.", "description": "This is an upcoming feature and currently does not return data.", - "operationId": "Notification.get", + "operationId": "GlobalNotification.get", "parameters": [], "responses": { "200": { @@ -1596,7 +1497,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/Notification" + "$ref": "#/definitions/GlobalNotification" } } }, @@ -1612,6 +1513,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1634,7 +1541,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -1719,6 +1626,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1733,7 +1646,7 @@ "Order" ], "summary": "Create a new order.", - "description": "## Placing Orders\n\nThis endpoint is used for placing orders. See individual fields below for more details on their use.\n\n#### Order Types\n\nAll orders require a `symbol`. All other fields are optional except when otherwise specified.\n\nThese are the valid `ordType`s:\n\n* **Limit**: The default order type. Specify an `orderQty` and `price`.\n* **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at\n which point it will cancel.\n* **MarketWithLeftOverAsLimit**: A market order that, after eating through the order book as far as\n permitted by available margin, will become a limit order. The difference between this type and `Market` only\n affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over,\n a `Market` order will cancel the remaining quantity. `MarketWithLeftOverAsLimit` will keep the remaining\n quantity in the books as a `Limit`.\n* **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered\n into the book.\n * On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher.\n * Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your\n account so that it may trigger fully.\n * `Close` Stops don't require an `orderQty`. See Execution Instructions below.\n* **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`,\n and `price`.\n* **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders.\n* **LimitIfTouched**: As above; use for Take Profit Limit orders.\n\n#### Execution Instructions\n\nThe following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`).\n\n* **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement,\n it will cancel instead.\n* **AllOrNone**: Valid only for hidden orders (`displayQty: 0`). Use to only execute if the entire order would fill.\n* **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price.\n Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`.\n* **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'`\n limit order that rests in the order book while the position is reduced by other orders, then its order quantity will\n be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least agresssive will be amended first.\n* **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side\n and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a\n `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your\n position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size.\n * Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger\n above or below the `stopPx`.\n\n#### Linked Orders\n\nLinked Orders are an advanced capability. It is very powerful, but its use requires careful coding and testing.\nPlease follow this document carefully and use the [Testnet Exchange](https://testnet.bitmex.com) while developing.\n\nBitMEX offers four advanced Linked Order types:\n\n* **OCO**: *One Cancels the Other*. A very flexible version of the standard Stop / Take Profit technique.\n Multiple orders may be linked together using a single `clOrdLinkID`. Send a `contingencyType` of\n `OneCancelsTheOther` on the orders. The first order that fully or partially executes (or activates\n for `Stop` orders) will cancel all other orders with the same `clOrdLinkID`.\n* **OTO**: *One Triggers the Other*. Send a `contingencyType` of `'OneTriggersTheOther'` on the primary order and\n then subsequent orders with the same `clOrdLinkID` will be not be triggered until the primary order fully executes.\n* **OUOA**: *One Updates the Other Absolute*. Send a `contingencyType` of `'OneUpdatesTheOtherAbsolute'` on the orders. Then\n as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity amended\n down by the execution quantity.\n* **OUOP**: *One Updates the Other Proportional*. Send a `contingencyType` of `'OneUpdatesTheOtherProportional'` on the orders. Then\n as one order has a execution, other orders with the same `clOrdLinkID` will have their order quantity reduced proportionally\n by the fill percentage.\n\n#### Trailing Stops\n\nYou may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market\nmoves away from the peg, and freeze as the market moves toward it.\n\nTo use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price\nspecified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders.\n\nRequires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`.\n\n#### Simple Quantities\n\nSend a `simpleOrderQty` instead of an `orderQty` to create an order denominated in the underlying currency.\nThis is useful for opening up a position with 1 XBT of exposure without having to calculate how many contracts it is.\n\n#### Rate Limits\n\nSee the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time.\nBulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate.\n\nYou can also improve your reactivity to market movements while staying under your ratelimit by using the\n[Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay\nin the market and avoids the cancel/replace cycle.\n\n#### Tracking Your Orders\n\nIf you want to keep track of order IDs yourself, set a unique `clOrdID` per order.\nThis `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket),\nand can be used to get or cancel the order. Max length is 36 characters.\n\nYou can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new\nID as the `clOrdID` param, like so:\n\n```\n# Amends an order's leavesQty, and updates its clOrdID to \"def-456\"\nPUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000}\n```\n", + "description": "## Placing Orders\n\nThis endpoint is used for placing orders. See individual fields below for more details on their use.\n\n#### Order Types\n\nAll orders require a `symbol`. All other fields are optional except when otherwise specified.\n\nThese are the valid `ordType`s:\n\n- **Limit**: The default order type. Specify an `orderQty` and `price`.\n- **Market**: A traditional Market order. A Market order will execute until filled or your bankruptcy price is reached, at\n which point it will cancel.\n- **Stop**: A Stop Market order. Specify an `orderQty` and `stopPx`. When the `stopPx` is reached, the order will be entered\n into the book.\n - On sell orders, the order will trigger if the triggering price is lower than the `stopPx`. On buys, higher.\n - Note: Stop orders do not consume margin until triggered. Be sure that the required margin is available in your\n account so that it may trigger fully.\n - `Close` Stops don't require an `orderQty`. See Execution Instructions below.\n- **StopLimit**: Like a Stop Market, but enters a Limit order instead of a Market order. Specify an `orderQty`, `stopPx`,\n and `price`.\n- **MarketIfTouched**: Similar to a Stop, but triggers are done in the opposite direction. Useful for Take Profit orders.\n- **LimitIfTouched**: As above; use for Take Profit Limit orders.\n\n#### Execution Instructions\n\nThe following `execInst`s are supported. If using multiple, separate with a comma (e.g. `LastPrice,Close`).\n\n- **ParticipateDoNotInitiate**: Also known as a Post-Only order. If this order would have executed on placement,\n it will cancel instead.\n- **MarkPrice, LastPrice, IndexPrice**: Used by stop and if-touched orders to determine the triggering price.\n Use only one. By default, `'MarkPrice'` is used. Also used for Pegged orders to define the value of `'LastPeg'`.\n- **ReduceOnly**: A `'ReduceOnly'` order can only reduce your position, not increase it. If you have a `'ReduceOnly'`\n limit order that rests in the order book while the position is reduced by other orders, then its order quantity will\n be amended down or canceled. If there are multiple `'ReduceOnly'` orders the least aggressive will be amended first.\n- **Close**: `'Close'` implies `'ReduceOnly'`. A `'Close'` order will cancel other active limit orders with the same side\n and symbol if the open quantity exceeds the current position. This is useful for stops: by canceling these orders, a\n `'Close'` Stop is ensured to have the margin required to execute, and can only execute up to the full size of your\n position. If `orderQty` is not specified, a `'Close'` order has an `orderQty` equal to your current position's size.\n - Note that a `Close` order without an `orderQty` requires a `side`, so that BitMEX knows if it should trigger\n above or below the `stopPx`.\n\n#### Linked Orders\n\n[Linked Orders are deprecated as of 2018/11/10](https://blog.bitmex.com/api_announcement/deprecation-of-contingent-orders/)\n\n#### Trailing Stops\n\nYou may use `pegPriceType` of `'TrailingStopPeg'` to create Trailing Stops. The pegged `stopPx` will move as the market\nmoves away from the peg, and freeze as the market moves toward it.\n\nTo use, combine with `pegOffsetValue` to set the `stopPx` of your order. The peg is set to the triggering price\nspecified in the `execInst` (default `'MarkPrice'`). Use a negative offset for stop-sell and buy-if-touched orders.\n\nRequires `ordType`: `'Stop', 'StopLimit', 'MarketIfTouched', 'LimitIfTouched'`.\n\n#### Simple Quantities\n\n[Simple Quantities are deprecated as of 2018/10/26](https://blog.bitmex.com/api_announcement/deprecation-of-simpleorderqty-functionality/)\n\n#### Rate Limits\n\nSee the [Bulk Order Documentation](#!/Order/Order_newBulk) if you need to place multiple orders at the same time.\nBulk orders require fewer risk checks in the trading engine and thus are ratelimited at **1/10** the normal rate.\n\nYou can also improve your reactivity to market movements while staying under your ratelimit by using the\n[Amend](#!/Order/Order_amend) and [Amend Bulk](#!/Order/Order_amendBulk) endpoints. This allows you to stay\nin the market and avoids the cancel/replace cycle.\n\n#### Tracking Your Orders\n\nIf you want to keep track of order IDs yourself, set a unique `clOrdID` per order.\nThis `clOrdID` will come back as a property on the order and any related executions (including on the WebSocket),\nand can be used to get or cancel the order. Max length is 36 characters.\n\nYou can also change the `clOrdID` by amending an order, supplying an `origClOrdID`, and your desired new\nID as the `clOrdID` param, like so:\n\n```\n# Amends an order's leavesQty, and updates its clOrdID to \"def-456\"\nPUT /api/v1/order {\"origClOrdID\": \"abc-123\", \"clOrdID\": \"def-456\", \"leavesQty\": 1000}\n```\n", "operationId": "Order.new", "parameters": [ { @@ -1746,14 +1659,14 @@ { "name": "side", "in": "formData", - "description": "Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` or `simpleOrderQty` is negative.", + "description": "Order side. Valid options: Buy, Sell. Defaults to 'Buy' unless `orderQty` is negative.", "required": false, "type": "string" }, { "name": "simpleOrderQty", "in": "formData", - "description": "Order quantity in units of the underlying instrument (i.e. Bitcoin).", + "description": "Deprecated: simple orders are not supported after 2018/10/26", "required": false, "type": "number", "format": "double" @@ -1800,7 +1713,7 @@ { "name": "clOrdLinkID", "in": "formData", - "description": "Optional Client Order Link ID for contingent orders.", + "description": "Deprecated: linked orders are not supported after 2018/11/10.", "required": false, "type": "string" }, @@ -1822,7 +1735,7 @@ { "name": "ordType", "in": "formData", - "description": "Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified.", + "description": "Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when `price` is specified. Defaults to 'Stop' when `stopPx` is specified. Defaults to 'StopLimit' when `price` and `stopPx` are specified.", "required": false, "default": "Limit", "type": "string" @@ -1830,7 +1743,7 @@ { "name": "timeInForce", "in": "formData", - "description": "Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', 'LimitIfTouched', and 'MarketWithLeftOverAsLimit' orders.", + "description": "Time in force. Valid options: Day, GoodTillCancel, ImmediateOrCancel, FillOrKill. Defaults to 'GoodTillCancel' for 'Limit', 'StopLimit', and 'LimitIfTouched' orders.", "required": false, "type": "string" }, @@ -1844,7 +1757,7 @@ { "name": "contingencyType", "in": "formData", - "description": "Optional contingency type for use with `clOrdLinkID`. Valid options: OneCancelsTheOther, OneTriggersTheOther, OneUpdatesTheOtherAbsolute, OneUpdatesTheOtherProportional.", + "description": "Deprecated: linked orders are not supported after 2018/11/10.", "required": false, "type": "string" }, @@ -1875,6 +1788,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -1889,7 +1808,7 @@ "Order" ], "summary": "Amend the quantity or price of an open order.", - "description": "Send an `orderID` or `origClOrdID` to identify the order you wish to amend.\n\nBoth order quantity and price can be amended. Only one `qty` field can be used to amend.\n\nUse the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful\nif you want to adjust your position's delta by a certain amount, regardless of how much of the order has\nalready filled.\n\n> A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill.\n\nUse the `simpleOrderQty` and `simpleLeavesQty` fields to specify order size in Bitcoin, rather than contracts.\nThese fields will round up to the nearest contract.\n\nLike order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with\na JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint.\n", + "description": "Send an `orderID` or `origClOrdID` to identify the order you wish to amend.\n\nBoth order quantity and price can be amended. Only one `qty` field can be used to amend.\n\nUse the `leavesQty` field to specify how much of the order you wish to remain open. This can be useful\nif you want to adjust your position's delta by a certain amount, regardless of how much of the order has\nalready filled.\n\n> A `leavesQty` can be used to make a \"Filled\" order live again, if it is received within 60 seconds of the fill.\n\nLike order placement, amending can be done in bulk. Simply send a request to `PUT /api/v1/order/bulk` with\na JSON body of the shape: `{\"orders\": [{...}, {...}]}`, each object containing the fields used in this endpoint.\n", "operationId": "Order.amend", "parameters": [ { @@ -1916,7 +1835,7 @@ { "name": "simpleOrderQty", "in": "formData", - "description": "Optional order quantity in units of the underlying instrument (i.e. Bitcoin).", + "description": "Deprecated: simple orders are not supported after 2018/10/26", "required": false, "type": "number", "format": "double" @@ -1932,7 +1851,7 @@ { "name": "simpleLeavesQty", "in": "formData", - "description": "Optional leaves quantity in units of the underlying instrument (i.e. Bitcoin). Useful for amending partially filled orders.", + "description": "Deprecated: simple orders are not supported after 2018/10/26", "required": false, "type": "number", "format": "double" @@ -1996,6 +1915,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2059,6 +1984,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2075,7 +2006,7 @@ "Order" ], "summary": "Create multiple new orders for the same symbol.", - "description": "This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, MarketWithLeftOverAsLimit, and Pegged.\n\nEach individual order object in the array should have the same properties as an individual POST /order call.\n\nThis endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX\nsystems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call\nwill only count as 1 request, 15 as 2, 32 as 4, and so on.\n\nFor now, only `application/json` is supported on this endpoint.\n", + "description": "This endpoint is used for placing bulk orders. Valid order types are Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, and Pegged.\n\nEach individual order object in the array should have the same properties as an individual POST /order call.\n\nThis endpoint is much faster for getting many orders into the book at once. Because it reduces load on BitMEX\nsystems, this endpoint is ratelimited at `ceil(0.1 * orders)`. Submitting 10 orders via a bulk order call\nwill only count as 1 request, 15 as 2, 32 as 4, and so on.\n\nFor now, only `application/json` is supported on this endpoint.\n", "operationId": "Order.newBulk", "parameters": [ { @@ -2109,6 +2040,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2157,6 +2094,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2212,6 +2155,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2275,6 +2224,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2322,6 +2277,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2380,6 +2341,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2397,7 +2364,7 @@ "Position" ], "summary": "Get your positions.", - "description": "See the FIX Spec for explanations of these fields.", + "description": "This endpoint is used for retrieving position information. The fields largely follow the [FIX spec](http://www.onixs.biz/fix-dictionary/5.0.SP2/msgType_AP_6580.html) definitions. Some selected fields are explained in more detail below.\n\nThe fields _account_, _symbol_, _currency_ are unique to each position and form its key.\n\n- **account**: Your unique account ID.\n- **symbol**: The contract for this position.\n- **currency**: The margin currency for this position.\n- **underlying**: Meta data of the _symbol_.\n- **quoteCurrency**: Meta data of the _symbol_, All prices are in the _quoteCurrency_\n- **commission**: The maximum of the maker, taker, and settlement fee.\n- **initMarginReq**: The initial margin requirement. This will be at least the symbol's default initial maintenance margin, but can be higher if you choose lower leverage.\n- **maintMarginReq**: The maintenance margin requirement. This will be at least the symbol's default maintenance maintenance margin, but can be higher if you choose a higher risk limit.\n- **riskLimit**: This is a function of your _maintMarginReq_.\n- **leverage**: 1 / initMarginReq.\n- **crossMargin**: True/false depending on whether you set cross margin on this position.\n- **deleveragePercentile**: Indicates where your position is in the ADL queue.\n- **rebalancedPnl**: The value of realised PNL that has transferred to your wallet for this position.\n- **prevRealisedPnl**: The value of realised PNL that has transferred to your wallet for this position since the position was closed.\n- **currentQty**: The current position amount in contracts.\n- **currentCost**: The current cost of the position in the settlement currency of the symbol (_currency_).\n- **currentComm**: The current commission of the position in the settlement currency of the symbol (_currency_).\n- **realisedCost**: The realised cost of this position calculated with regard to average cost accounting.\n- **unrealisedCost**: _currentCost_ - _realisedCost_.\n- **grossOpenCost**: The absolute value of your open orders for this symbol.\n- **grossOpenPremium**: The amount your bidding above the mark price in the settlement currency of the symbol (_currency_).\n- **markPrice**: The mark price of the symbol in _quoteCurrency_.\n- **markValue**: The _currentQty_ at the mark price in the settlement currency of the symbol (_currency_).\n- **homeNotional**: Value of position in units of _underlying_.\n- **foreignNotional**: Value of position in units of _quoteCurrency_.\n- **realisedPnl**: The negative of _realisedCost_.\n- **unrealisedGrossPnl**: _markValue_ - _unrealisedCost_.\n- **unrealisedPnl**: _unrealisedGrossPnl_.\n- **liquidationPrice**: Once markPrice reaches this price, this position will be liquidated.\n- **bankruptPrice**: Once markPrice reaches this price, this position will have no equity.\n", "operationId": "Position.get", "parameters": [ { @@ -2447,6 +2414,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2501,6 +2474,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2555,6 +2534,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2609,6 +2594,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2663,6 +2654,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2684,7 +2681,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -2769,6 +2766,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2786,6 +2789,7 @@ "Quote" ], "summary": "Get previous quotes in time buckets.", + "description": "Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint.", "operationId": "Quote.getBucketed", "parameters": [ { @@ -2807,7 +2811,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -2892,6 +2896,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2938,6 +2948,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2976,6 +2992,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -2998,7 +3020,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -3083,6 +3105,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -3124,6 +3152,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -3165,6 +3199,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -3206,6 +3246,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -3229,7 +3275,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -3314,6 +3360,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -3331,6 +3383,7 @@ "Trade" ], "summary": "Get previous trades in time buckets.", + "description": "Timestamps returned by our bucketed endpoints are the **end** of the period, indicating when the bucket was written to disk. Some other common systems use the timestamp as the beginning of the period. Please be aware of this when using this endpoint.\n\nAlso note the `open` price is equal to the `close` price of the previous timeframe bucket.", "operationId": "Trade.getBucketed", "parameters": [ { @@ -3352,7 +3405,7 @@ { "name": "symbol", "in": "query", - "description": "Instrument symbol. Send a bare series (e.g. XBU) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBU:monthly`. Timeframes are `daily`, `weekly`, `monthly`, `quarterly`, and `biquarterly`.", + "description": "Instrument symbol. Send a bare series (e.g. XBT) to get data for the nearest expiring contract in that series.\n\nYou can also send a timeframe, e.g. `XBT:quarterly`. Timeframes are `nearest`, `daily`, `weekly`, `monthly`, `quarterly`, `biquarterly`, and `perpetual`.", "required": false, "type": "string" }, @@ -3437,6 +3490,12 @@ "$ref": "#/definitions/Error" } }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, "404": { "description": "Not Found", "schema": { @@ -3470,6 +3529,30 @@ "schema": { "type": "string" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false @@ -3497,6 +3580,30 @@ "schema": { "$ref": "#/definitions/Wallet" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false @@ -3516,6 +3623,24 @@ "required": false, "default": "XBt", "type": "string" + }, + { + "name": "count", + "in": "query", + "description": "Number of results to fetch.", + "required": false, + "default": 100, + "type": "number", + "format": "double" + }, + { + "name": "start", + "in": "query", + "description": "Starting point for results.", + "required": false, + "default": 0, + "type": "number", + "format": "double" } ], "responses": { @@ -3527,6 +3652,30 @@ "$ref": "#/definitions/Transaction" } } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false @@ -3557,26 +3706,57 @@ "$ref": "#/definitions/Transaction" } } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false } }, - "/user/minWithdrawalFee": { + "/user/executionHistory": { "get": { "tags": [ "User" ], - "summary": "Get the minimum withdrawal fee for a currency.", - "description": "This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency.", - "operationId": "User.minWithdrawalFee", + "summary": "Get the execution history by day.", + "operationId": "User.getExecutionHistory", "parameters": [ { - "name": "currency", + "name": "symbol", "in": "query", - "required": false, - "default": "XBt", + "required": true, + "default": "XBTUSD", "type": "string" + }, + { + "name": "timestamp", + "in": "query", + "required": true, + "default": "2017-02-13T12:00:00.000Z", + "type": "string", + "format": "date-time" } ], "responses": { @@ -3585,10 +3765,86 @@ "schema": { "type": "object" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, - "deprecated": false, - "security": [] + "deprecated": false + } + }, + "/user/minWithdrawalFee": { + "get": { + "tags": [ + "User" + ], + "summary": "Get the minimum withdrawal fee for a currency.", + "description": "This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency.", + "operationId": "User.minWithdrawalFee", + "parameters": [ + { + "name": "currency", + "in": "query", + "required": false, + "default": "XBt", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Request was successful", + "schema": { + "type": "object" + } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "deprecated": false, + "security": [] } }, "/user/requestWithdrawal": { @@ -3597,7 +3853,7 @@ "User" ], "summary": "Request a withdrawal to an external wallet.", - "description": "This will send a confirmation email to the email address on record, unless requested via an API Key with the `withdraw` permission.", + "description": "This will send a confirmation email to the email address on record.", "operationId": "User.requestWithdrawal", "parameters": [ { @@ -3637,6 +3893,13 @@ "required": false, "type": "number", "format": "double" + }, + { + "name": "text", + "in": "formData", + "description": "Optional annotation, e.g. 'Transfer to home wallet'.", + "required": false, + "type": "string" } ], "responses": { @@ -3645,6 +3908,30 @@ "schema": { "$ref": "#/definitions/Transaction" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false @@ -3671,6 +3958,30 @@ "schema": { "$ref": "#/definitions/Transaction" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false, @@ -3698,106 +4009,34 @@ "schema": { "$ref": "#/definitions/Transaction" } - } - }, - "deprecated": false, - "security": [] - } - }, - "/user/requestEnableTFA": { - "post": { - "tags": [ - "User" - ], - "summary": "Get secret key for setting up two-factor auth.", - "description": "Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled.", - "operationId": "User.requestEnableTFA", - "parameters": [ - { - "name": "type", - "in": "formData", - "description": "Two-factor auth type. Supported types: 'GA' (Google Authenticator)", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Request was successful", + }, + "400": { + "description": "Parameter Error", "schema": { - "type": "boolean" + "$ref": "#/definitions/Error" } - } - }, - "deprecated": false - } - }, - "/user/confirmEnableTFA": { - "post": { - "tags": [ - "User" - ], - "summary": "Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint.", - "operationId": "User.confirmEnableTFA", - "parameters": [ - { - "name": "type", - "in": "formData", - "description": "Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey'", - "required": false, - "type": "string" }, - { - "name": "token", - "in": "formData", - "description": "Token from your selected TFA type.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Request was successful", + "401": { + "description": "Unauthorized", "schema": { - "type": "boolean" + "$ref": "#/definitions/Error" } - } - }, - "deprecated": false - } - }, - "/user/disableTFA": { - "post": { - "tags": [ - "User" - ], - "summary": "Disable two-factor auth for this account.", - "operationId": "User.disableTFA", - "parameters": [ - { - "name": "type", - "in": "formData", - "description": "Two-factor auth type. Supported types: 'GA' (Google Authenticator)", - "required": false, - "type": "string" }, - { - "name": "token", - "in": "formData", - "description": "Token from your selected TFA type.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Request was successful", + "403": { + "description": "Access Denied", "schema": { - "type": "boolean" + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" } } }, - "deprecated": false + "deprecated": false, + "security": [] } }, "/user/confirmEmail": { @@ -3821,6 +4060,30 @@ "schema": { "$ref": "#/definitions/AccessToken" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false, @@ -3841,6 +4104,30 @@ "schema": { "$ref": "#/definitions/Affiliate" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false @@ -3852,7 +4139,7 @@ "User" ], "summary": "Check if a referral code is valid.", - "description": "If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404.", + "description": "If the code is valid, responds with the referral code's discount (e.g. `0.1` for 10%). Otherwise, will return a 404 or 451 if invalid.", "operationId": "User.checkReferralCode", "parameters": [ { @@ -3869,50 +4156,121 @@ "type": "number", "format": "double" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false, "security": [] } }, - "/user/logout": { - "post": { + "/user/quoteFillRatio": { + "get": { "tags": [ "User" ], - "summary": "Log out of BitMEX.", - "operationId": "User.logout", + "summary": "Get 7 days worth of Quote Fill Ratio statistics.", + "operationId": "User.getQuoteFillRatio", "parameters": [], "responses": { "200": { "description": "Request was successful", "schema": { - "type": "null" + "$ref": "#/definitions/QuoteFillRatio" + } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" } } }, - "deprecated": false, - "security": [] + "deprecated": false } }, - "/user/logoutAll": { + "/user/logout": { "post": { "tags": [ "User" ], - "summary": "Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices.", - "operationId": "User.logoutAll", + "summary": "Log out of BitMEX.", + "operationId": "User.logout", "parameters": [], "responses": { "200": { "description": "Request was successful", "schema": { - "type": "number", - "format": "double" + "type": "null" + } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" } } }, - "deprecated": false + "deprecated": false, + "security": [] } }, "/user/preferences": { @@ -3945,6 +4303,30 @@ "schema": { "$ref": "#/definitions/User" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false @@ -3964,66 +4346,91 @@ "schema": { "$ref": "#/definitions/User" } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false - }, - "put": { + } + }, + "/user/commission": { + "get": { "tags": [ "User" ], - "summary": "Update your password, name, and other attributes.", - "operationId": "User.update", - "parameters": [ - { - "name": "firstname", - "in": "formData", - "required": false, - "type": "string" - }, - { - "name": "lastname", - "in": "formData", - "required": false, - "type": "string" - }, - { - "name": "oldPassword", - "in": "formData", - "required": false, - "type": "string" - }, - { - "name": "newPassword", - "in": "formData", - "required": false, - "type": "string" + "summary": "Get your account's commission status.", + "operationId": "User.getCommission", + "parameters": [], + "responses": { + "200": { + "description": "Request was successful", + "schema": { + "$ref": "#/definitions/UserCommissionsBySymbol" + } }, - { - "name": "newPasswordConfirm", - "in": "formData", - "required": false, - "type": "string" + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } }, - { - "name": "username", - "in": "formData", - "description": "Username can only be set once. To reset, email support.", - "required": false, - "type": "string" + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } }, - { - "name": "country", - "in": "formData", - "description": "Country of residence.", - "required": false, - "type": "string" + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "deprecated": false + } + }, + "/user/margin": { + "get": { + "tags": [ + "User" + ], + "summary": "Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies.", + "operationId": "User.getMargin", + "parameters": [ { - "name": "pgpPubKey", - "in": "formData", - "description": "PGP Public Key. If specified, automated emails will be sentwith this key.", + "name": "currency", + "in": "query", "required": false, + "default": "XBt", "type": "string" } ], @@ -4031,56 +4438,154 @@ "200": { "description": "Request was successful", "schema": { - "$ref": "#/definitions/User" + "$ref": "#/definitions/Margin" + } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" } } }, "deprecated": false } }, - "/user/commission": { - "get": { + "/user/communicationToken": { + "post": { "tags": [ "User" ], - "summary": "Get your account's commission status.", - "operationId": "User.getCommission", - "parameters": [], + "summary": "Register your communication token for mobile clients", + "operationId": "User.communicationToken", + "parameters": [ + { + "name": "token", + "in": "formData", + "required": true, + "type": "string" + }, + { + "name": "platformAgent", + "in": "formData", + "required": true, + "type": "string" + } + ], "responses": { "200": { "description": "Request was successful", "schema": { "type": "array", "items": { - "$ref": "#/definitions/UserCommission" + "$ref": "#/definitions/CommunicationToken" } } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } } }, "deprecated": false } }, - "/user/margin": { + "/userEvent": { "get": { "tags": [ - "User" + "UserEvent" ], - "summary": "Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies.", - "operationId": "User.getMargin", + "summary": "Get your user events", + "operationId": "UserEvent.get", "parameters": [ { - "name": "currency", + "name": "count", "in": "query", + "description": "Number of results to fetch.", "required": false, - "default": "XBt", - "type": "string" + "default": 150, + "type": "number", + "format": "double" + }, + { + "name": "startId", + "in": "query", + "description": "Cursor for pagination.", + "required": false, + "type": "number", + "format": "double" } ], "responses": { "200": { "description": "Request was successful", "schema": { - "$ref": "#/definitions/Margin" + "type": "array", + "items": { + "$ref": "#/definitions/UserEvent" + } + } + }, + "400": { + "description": "Parameter Error", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Access Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" } } }, @@ -4126,7 +4631,7 @@ "description": "Active Liquidations" }, { - "name": "Notification", + "name": "GlobalNotification", "description": "Account Notifications" }, { @@ -4164,6 +4669,10 @@ { "name": "User", "description": "Account Operations" + }, + { + "name": "UserEvent", + "description": "User Events for auditing" } ], "consumes": [ @@ -4223,10 +4732,6 @@ ], "type": "object" }, - "x-any": { - "properties": {}, - "type": "object" - }, "APIKey": { "description": "Persistent API Keys for Developers", "properties": { @@ -4822,6 +5327,14 @@ "format": "int64", "type": "number" }, + "homeNotional24h": { + "format": "double", + "type": "number" + }, + "foreignNotional24h": { + "format": "double", + "type": "number" + }, "prevPrice24h": { "format": "double", "type": "number" @@ -5057,7 +5570,7 @@ ], "type": "object" }, - "Notification": { + "GlobalNotification": { "description": "Account Notifications", "properties": { "id": { @@ -5261,6 +5774,10 @@ ], "type": "object" }, + "x-any": { + "properties": {}, + "type": "object" + }, "Position": { "description": "Summary of Open and Closed Positions", "properties": { @@ -6225,6 +6742,14 @@ "referrerAccount": { "type": "number", "format": "double" + }, + "referralDiscount": { + "type": "number", + "format": "double" + }, + "affiliatePayout": { + "type": "number", + "format": "double" } }, "required": [ @@ -6233,6 +6758,43 @@ ], "type": "object" }, + "QuoteFillRatio": { + "description": "Daily Quote Fill Ratio Statistic", + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "account": { + "type": "number", + "format": "double" + }, + "quoteCount": { + "type": "number", + "format": "double" + }, + "dealtCount": { + "type": "number", + "format": "double" + }, + "quotesMavg7": { + "type": "number", + "format": "double" + }, + "dealtMavg7": { + "type": "number", + "format": "double" + }, + "quoteFillRatioMavg7": { + "type": "number", + "format": "double" + } + }, + "required": [ + "date" + ], + "type": "object" + }, "User": { "description": "Account Operations", "properties": { @@ -6304,25 +6866,8 @@ ], "type": "object" }, - "UserCommission": { - "properties": { - "makerFee": { - "type": "number", - "format": "double" - }, - "takerFee": { - "type": "number", - "format": "double" - }, - "settlementFee": { - "type": "number", - "format": "double" - }, - "maxFee": { - "type": "number", - "format": "double" - } - }, + "UserCommissionsBySymbol": { + "properties": {}, "type": "object" }, "Margin": { @@ -6530,6 +7075,115 @@ ], "type": "object" }, + "CommunicationToken": { + "description": "User communication SNS token", + "properties": { + "id": { + "type": "string" + }, + "userId": { + "format": "int32", + "type": "number" + }, + "deviceToken": { + "type": "string" + }, + "channel": { + "type": "string" + } + }, + "required": [ + "id", + "userId", + "deviceToken", + "channel" + ], + "type": "object" + }, + "UserEvent": { + "description": "User Events for auditing", + "properties": { + "id": { + "type": "number", + "format": "double" + }, + "type": { + "enum": [ + "apiKeyCreated", + "deleverageExecution", + "depositConfirmed", + "depositPending", + "banZeroVolumeApiUser", + "liquidationOrderPlaced", + "login", + "pgpMaskedEmail", + "pgpTestEmail", + "passwordChanged", + "positionStateLiquidated", + "positionStateWarning", + "resetPasswordConfirmed", + "resetPasswordRequest", + "transferCanceled", + "transferCompleted", + "transferReceived", + "transferRequested", + "twoFactorDisabled", + "twoFactorEnabled", + "withdrawalCanceled", + "withdrawalCompleted", + "withdrawalConfirmed", + "withdrawalRequested", + "verify" + ], + "type": "string" + }, + "status": { + "enum": [ + "success", + "failure" + ], + "type": "string" + }, + "userId": { + "type": "number", + "format": "double" + }, + "createdById": { + "type": "number", + "format": "double" + }, + "ip": { + "type": "string" + }, + "geoipCountry": { + "maxLength": 2, + "type": "string" + }, + "geoipRegion": { + "maxLength": 3, + "type": "string" + }, + "geoipSubRegion": { + "maxLength": 3, + "type": "string" + }, + "eventMeta": { + "type": "object" + }, + "created": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "type", + "status", + "userId", + "createdById", + "created" + ], + "type": "object" + }, "UserPreferences": { "properties": { "alertOnLiquidations": { @@ -6561,6 +7215,12 @@ "type": "string" } }, + "disablePush": { + "type": "array", + "items": { + "type": "string" + } + }, "hideConfirmDialogs": { "type": "array", "items": { @@ -6649,17 +7309,18 @@ "in": "header", "name": "api-signature" }, - "apiNonce": { + "apiExpires": { "type": "apiKey", "in": "header", - "name": "api-nonce" + "name": "api-expires" } }, "security": [ { "apiKey": [], "apiSignature": [], - "apiNonce": [] + "apiExpires": [] } - ] + ], + "host": "www.bitmex.com" }