From 4fd605e013c5235e76dade17535a13805d6e47c2 Mon Sep 17 00:00:00 2001 From: Alexandre Catarino Date: Fri, 26 Apr 2024 21:29:56 +0100 Subject: [PATCH] Fixes brokerage for API Reference --- .../01 Create Backtest/03 Responses.html | 48 +- .../02 Portfolio/03 Responses.html | 30 +- .../03 Orders/03 Responses.html | 66 +- .../01 Create Live Algorithm/02 Request.html | 1081 ++++++++++++++++- .../03 Portfolio State/03 Responses.html | 30 +- .../04 Orders/03 Responses.html | 66 +- QuantConnect-Platform-2.0.0.yaml | 12 +- .../API-Reference-Code-Generator.py | 23 +- 8 files changed, 1224 insertions(+), 132 deletions(-) diff --git a/01 Cloud Platform/99 API Reference/05 Backtest Management/01 Create Backtest/03 Responses.html b/01 Cloud Platform/99 API Reference/05 Backtest Management/01 Create Backtest/03 Responses.html index 4c0808a1b3..2aa0d7337f 100644 --- a/01 Cloud Platform/99 API Reference/05 Backtest Management/01 Create Backtest/03 Responses.html +++ b/01 Cloud Platform/99 API Reference/05 Backtest Management/01 Create Backtest/03 Responses.html @@ -141,9 +141,9 @@

200 Success

"ClosedTrades": [ { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "EntryTime": "2021-11-26T15:18:27.693Z", "EntryPrice": 0, @@ -281,9 +281,9 @@

200 Success

"ClosedTrades": [ { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "EntryTime": "2021-11-26T15:18:27.693Z", "EntryPrice": 0, @@ -518,9 +518,9 @@

200 Success

"ClosedTrades": [ { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "EntryTime": "2021-11-26T15:18:27.693Z", "EntryPrice": 0, @@ -658,9 +658,9 @@

200 Success

"ClosedTrades": [ { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "EntryTime": "2021-11-26T15:18:27.693Z", "EntryPrice": 0, @@ -932,9 +932,9 @@

200 Success

"ClosedTrades": [ { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "EntryTime": "2021-11-26T15:18:27.693Z", "EntryPrice": 0, @@ -1275,9 +1275,9 @@

200 Success

 {
   "Symbol": {
-    "Value": "string",
-    "ID": "string",
-    "Permtick": "string"
+    "value": "string",
+    "id": "string",
+    "permtick": "string"
   },
   "EntryTime": "2021-11-26T15:18:27.693Z",
   "EntryPrice": 0,
@@ -1302,22 +1302,22 @@ 

200 Success

-Value string
The current symbol for this ticker. +value string
The current symbol for this ticker. -ID string
The security identifier for this symbol. +id string
The security identifier for this symbol. -Permtick string
The current symbol for this ticker. +permtick string
The current symbol for this ticker. Example
 {
-  "Value": "string",
-  "ID": "string",
-  "Permtick": "string"
+  "value": "string",
+  "id": "string",
+  "permtick": "string"
 }
diff --git a/01 Cloud Platform/99 API Reference/05 Backtest Management/02 Read Backtest/02 Portfolio/03 Responses.html b/01 Cloud Platform/99 API Reference/05 Backtest Management/02 Read Backtest/02 Portfolio/03 Responses.html index c9f4209902..3b621b1907 100644 --- a/01 Cloud Platform/99 API Reference/05 Backtest Management/02 Read Backtest/02 Portfolio/03 Responses.html +++ b/01 Cloud Platform/99 API Reference/05 Backtest Management/02 Read Backtest/02 Portfolio/03 Responses.html @@ -21,9 +21,9 @@

200 Success

"portfolio": { "Holdings": { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "Type": "Base", "CurrencySymbol": "$", @@ -65,9 +65,9 @@

200 Success

{ "Holdings": { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "Type": "Base", "CurrencySymbol": "$", @@ -128,9 +128,9 @@

200 Success

 {
   "Symbol": {
-    "Value": "string",
-    "ID": "string",
-    "Permtick": "string"
+    "value": "string",
+    "id": "string",
+    "permtick": "string"
   },
   "Type": "Base",
   "CurrencySymbol": "$",
@@ -151,22 +151,22 @@ 

200 Success

-Value string
The current symbol for this ticker. +value string
The current symbol for this ticker. -ID string
The security identifier for this symbol. +id string
The security identifier for this symbol. -Permtick string
The current symbol for this ticker. +permtick string
The current symbol for this ticker. Example
 {
-  "Value": "string",
-  "ID": "string",
-  "Permtick": "string"
+  "value": "string",
+  "id": "string",
+  "permtick": "string"
 }
diff --git a/01 Cloud Platform/99 API Reference/05 Backtest Management/02 Read Backtest/03 Orders/03 Responses.html b/01 Cloud Platform/99 API Reference/05 Backtest Management/02 Read Backtest/03 Orders/03 Responses.html index 4152a104c1..f8ef603b44 100644 --- a/01 Cloud Platform/99 API Reference/05 Backtest Management/02 Read Backtest/03 Orders/03 Responses.html +++ b/01 Cloud Platform/99 API Reference/05 Backtest Management/02 Read Backtest/03 Orders/03 Responses.html @@ -28,9 +28,9 @@

200 Success

"string" ], "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "limitPrice": , "stopPrice": 0, @@ -50,9 +50,9 @@

200 Success

"direction": 0 = Buy, "value": 0, "orderSubmissionData": { - "BidPrice": 0, - "AskPrice": 0, - "LastPrice": 0 + "bidPrice": 0, + "askPrice": 0, + "lastPrice": 0 }, "isMarketable": true, "properties": { @@ -67,9 +67,9 @@

200 Success

"orderEventId": 0, "id": 0, "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "status": "new", "orderFeeAmount": 0, @@ -214,9 +214,9 @@

200 Success

"string" ], "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "limitPrice": , "stopPrice": 0, @@ -236,9 +236,9 @@

200 Success

"direction": 0 = Buy, "value": 0, "orderSubmissionData": { - "BidPrice": 0, - "AskPrice": 0, - "LastPrice": 0 + "bidPrice": 0, + "askPrice": 0, + "lastPrice": 0 }, "isMarketable": true, "properties": { @@ -253,9 +253,9 @@

200 Success

"orderEventId": 0, "id": 0, "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "status": "new", "orderFeeAmount": 0, @@ -298,22 +298,22 @@

200 Success

-Value string
The current symbol for this ticker. +value string
The current symbol for this ticker. -ID string
The security identifier for this symbol. +id string
The security identifier for this symbol. -Permtick string
The current symbol for this ticker. +permtick string
The current symbol for this ticker. Example
 {
-  "Value": "string",
-  "ID": "string",
-  "Permtick": "string"
+  "value": "string",
+  "id": "string",
+  "permtick": "string"
 }
@@ -325,22 +325,22 @@

200 Success

-BidPrice number
The bid price at an order submission time. +bidPrice number
The bid price at an order submission time. -AskPrice number
The ask price at an order submission time. +askPrice number
The ask price at an order submission time. -LastPrice number
The current price at an order submission time. +lastPrice number
The current price at an order submission time. Example
 {
-  "BidPrice": 0,
-  "AskPrice": 0,
-  "LastPrice": 0
+  "bidPrice": 0,
+  "askPrice": 0,
+  "lastPrice": 0
 }
@@ -445,9 +445,9 @@

200 Success

"orderEventId": 0, "id": 0, "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "status": "new", "orderFeeAmount": 0, diff --git a/01 Cloud Platform/99 API Reference/07 Live Management/01 Create Live Algorithm/02 Request.html b/01 Cloud Platform/99 API Reference/07 Live Management/01 Create Live Algorithm/02 Request.html index c7a3367a60..f11316ec28 100644 --- a/01 Cloud Platform/99 API Reference/07 Live Management/01 Create Live Algorithm/02 Request.html +++ b/01 Cloud Platform/99 API Reference/07 Live Management/01 Create Live Algorithm/02 Request.html @@ -21,7 +21,7 @@ nodeId string
Id of the node that will run the algorithm. -brokerage object Enum
Brokerage configurations to be used in the live algorithm. Options : [{'$ref': '#/components/schemas/QuantConnectSettings'}, {'$ref': '#/components/schemas/InteractiveBrokersSettings'}, {'$ref': '#/components/schemas/BinanceSettings'}, {'$ref': '#/components/schemas/BinanceFuturesUSDMSettings'}, {'$ref': '#/components/schemas/BinanceFuturesCOINSettings'}, {'$ref': '#/components/schemas/BinanceUSSettings'}, {'$ref': '#/components/schemas/TradierSettings'}, {'$ref': '#/components/schemas/BitfinexSettings'}, {'$ref': '#/components/schemas/CoinbaseSettings'}, {'$ref': '#/components/schemas/KrakenSettings'}, {'$ref': '#/components/schemas/BybitSettings'}, {'$ref': '#/components/schemas/OandaSettings'}, {'$ref': '#/components/schemas/ZerodhaSettings'}, {'$ref': '#/components/schemas/SamcoSettings'}, {'$ref': '#/components/schemas/WolverineSettings'}, {'$ref': '#/components/schemas/TDAmeritradeSettings'}, {'$ref': '#/components/schemas/TradingTechnologiesSettings'}, {'$ref': '#/components/schemas/RBIBrokerageSettings'}, {'$ref': '#/components/schemas/TerminalLinkSettings'}] +brokerage object Enum
Brokerage configurations to be used in the live algorithm. Options : ['QuantConnectSettings', 'InteractiveBrokersSettings', 'BinanceSettings', 'BinanceFuturesUSDMSettings', 'BinanceFuturesCOINSettings', 'BinanceUSSettings', 'TradierSettings', 'BitfinexSettings', 'CoinbaseSettings', 'KrakenSettings', 'BybitSettings', 'OandaSettings', 'ZerodhaSettings', 'SamcoSettings', 'WolverineSettings', 'TDAmeritradeSettings', 'TradingTechnologiesSettings', 'RBIBrokerageSettings', 'TerminalLinkSettings'] dataProviders object
Dictionary of data provider configurations to be used in the live algorithm. @@ -35,10 +35,1087 @@ "projectId": 0, "compileId": "string", "nodeId": "string", - "brokerage": {'$ref': '#/components/schemas/QuantConnectSettings'}, + "brokerage": { + "id": "string" + }, "dataProviders": }
+ + + + + + + + + + + + + +
QuantConnectSettings Model - QuantConnect settings for using it as a brokerage or data provider.
id string
ID of QuantConnect, this is QuantConnectBrokerage.
Example +
+{
+  "id": "string"
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
InteractiveBrokersSettings Model - Settings for using Interactive Brokers as brokerage or data provider.
id string
ID of InteractiveBrokers, this is InteractiveBrokersBrokerage.
ib-user-name string
Your Interactive Brokers username.
ib-password string
Your Interactive Brokers password.
ib-trading-mode string Enum
Represents the types of environments supported by Interactive Brokers for trading. Options : ['live', 'paper']
ib-account string
Your Interactive Brokers account id.
ib-weekly-restart-utc-time string($date)
Weekly restart UTC time (hh:mm:ss).
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
Example +
+{
+  "id": "string",
+  "ib-user-name": "string",
+  "ib-password": "string",
+  "ib-trading-mode": "live",
+  "ib-account": "string",
+  "ib-weekly-restart-utc-time": "2021-11-26T15:18:27.693Z",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ]
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BinanceSettings Model
id string
ID of the brokerage, this is, BinanceBrokerage.
binance-exchange-name string
Binance exchange, this is, Binance.
binance-api-secret string
Your Binance API secret.
binance-api-key string
Your Binance API key.
binance-api-url string
Binance configuration for spot/margin. The value for this property is https://api.binance.com.
binance-websocket-url string
Binance configuration for spot/margin. The value for this property is wss://stream.binance.com:9443/ws.
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
description object
/.
Example +
+{
+  "id": "string",
+  "binance-exchange-name": "string",
+  "binance-api-secret": "string",
+  "binance-api-key": "string",
+  "binance-api-url": "string",
+  "binance-websocket-url": "string",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ],
+  "description": 
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BinanceFuturesUSDMSettings Model
id string
ID of the brokerage, this is, BinanceBrokerage.
binance-exchange-name string
Binance exchange, this is, Binance-USDM-Futures.
binance-api-secret string
Your Binance API secret.
binance-api-key string
Your Binance API key.
binance-fapi-url string
Binance Futures configuration for spot/margin. The value for this property is https://fapi.binance.com.
binance-fwebsocket-url string
Binance Futures configuration for spot/margin. The value for this property is wss://fstream.binance.com/ws.
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
description object
/.
Example +
+{
+  "id": "string",
+  "binance-exchange-name": "string",
+  "binance-api-secret": "string",
+  "binance-api-key": "string",
+  "binance-fapi-url": "string",
+  "binance-fwebsocket-url": "string",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ],
+  "description": 
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BinanceFuturesCOINSettings Model
id string
ID of the brokerage, this is, BinanceBrokerage.
binance-exchange-name string
Binance exchange, this is, Binance-COIN-Futures.
binance-api-secret string
Your Binance API secret.
binance-api-key string
Your Binance API key.
binance-dapi-url string
Binance Futures configuration for spot/margin. The value for this property is https://dapi.binance.com.
binance-dwebsocket-url string
Binance Futures configuration for spot/margin. The value for this property is wss://dstream.binance.com/ws.
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
description object
/.
Example +
+{
+  "id": "string",
+  "binance-exchange-name": "string",
+  "binance-api-secret": "string",
+  "binance-api-key": "string",
+  "binance-dapi-url": "string",
+  "binance-dwebsocket-url": "string",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ],
+  "description": 
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BinanceUSSettings Model
id string
ID of the brokerage, this is, BinanceBrokerage.
binance-exchange-name string
Binance exchange, this is, BinanceUS.
binanceus-api-secret string
Your Binance US API secret.
binanceus-api-key string
Your Binance US API key.
binanceus-api-url string
Binance US configuration for spot/margin. The value for this property is https://api.binance.us.
binanceus-websocket-url string
Binance US configuration for spot/margin. The value for this property is wss://stream.binance.us:9443/ws.
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
description object
/.
Example +
+{
+  "id": "string",
+  "binance-exchange-name": "string",
+  "binanceus-api-secret": "string",
+  "binanceus-api-key": "string",
+  "binanceus-api-url": "string",
+  "binanceus-websocket-url": "string",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ],
+  "description": 
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TradierSettings Model - Settings for using Tradier as a data provider.
id string
ID of the brokerage, this is, TradierBrokerage.
tradier-account-id string
Your Tradier account id.
tradier-access-token string
Your Tradier access token.
tradier-environment string Enum
Whether the developer sandbox should be used. Options : ['live', 'paper']
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
Example +
+{
+  "id": "string",
+  "tradier-account-id": "string",
+  "tradier-access-token": "string",
+  "tradier-environment": "live",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ]
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
BitfinexSettings Model - Settings for using Bitfinex as a data provider or brokerage.
id string
ID of the brokerage, this is, BitfinexBrokerage.
bitfinex-api-key string
Your Bitfinex API key.
bitfinex-api-secret string
Your Bitfinex API secret.
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
Example +
+{
+  "id": "string",
+  "bitfinex-api-key": "string",
+  "bitfinex-api-secret": "string",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ]
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CoinbaseSettings Model - Settings for using Coinbase as a data provider or brokerage.
id string
ID of the brokerage, this is, CoinbaseBrokerage.
coinbase-api-key string
Your Coinbase Advanced Trade API key.
coinbase-api-secret string
Your Coinbase Advanced Trade API secret.
coinbase-url string
Coinbase URL, this is, wss://advanced-trade-ws.coinbase.com.
coinbase-rest-api string
Coinbase REST API, this is, https://api.coinbase.com.
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
Example +
+{
+  "id": "string",
+  "coinbase-api-key": "string",
+  "coinbase-api-secret": "string",
+  "coinbase-url": "string",
+  "coinbase-rest-api": "string",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ]
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
KrakenSettings Model - Settings for using Kraken as a data provider.
id string
ID of the brokerage, this is, KrakenBrokerage.
kraken-api-key string
Your Kraken API key.
kraken-api-secret string
Your Kraken API secret.
kraken-verification-tier string
Your Kraken Verification Tier.
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
Example +
+{
+  "id": "string",
+  "kraken-api-key": "string",
+  "kraken-api-secret": "string",
+  "kraken-verification-tier": "string",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ]
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BybitSettings Model - Settings for using Bybit as a data provider or brokerage.
id string
ID of the brokerage, this is, BybitBrokerage.
bybit-api-key string
Your Bybit API key.
bybit-api-secret string
Your Bybit API secret.
bybit-vip-level string
Your Bybit VIP Level.
bybit-use-testnet string Enum
Whether the testnet should be used. Options : ['live', 'paper']
bybit-api-url string
Bybit API URL, this is, https://api-testnet.bybit.com.
bybit-websocket-url string
Bybit Websocket URL, this is, wss://stream.bybit.com.
holdings Holding Array
List of holdings for the brokerage.
cash CashAmount Array
List of cash amount.
Example +
+{
+  "id": "string",
+  "bybit-api-key": "string",
+  "bybit-api-secret": "string",
+  "bybit-vip-level": "string",
+  "bybit-use-testnet": "live",
+  "bybit-api-url": "string",
+  "bybit-websocket-url": "string",
+  "holdings": [
+    {
+      "Symbol": {
+        "value": "string",
+        "id": "string",
+        "permtick": "string"
+      },
+      "Type": "Base",
+      "CurrencySymbol": "$",
+      "AveragePrice": 0,
+      "Quantity": 0,
+      "MarketPrice": 0,
+      "ConversionRate": 0,
+      "MarketValue": 0,
+      "UnrealizedPnl": 0
+    }
+  ],
+  "cash": [
+    {
+      "amount": 0,
+      "currency": "string"
+    }
+  ]
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + +
OandaSettings Model - Settings for using Oanda as a data provider or brokerage.
id string
ID of the brokerage, this is, OandaBrokerage.
oanda-account-id string
Your OANDA account id can be found on your OANDA Account Statement page (https://www.oanda.com/account/statement/). It follows the following format '###-###-######-###'.
oanda-access-token string
Your OANDA API token. You can generate an API token from the Manage API Access page (https://www.oanda.com/account/tpa/personal_token).
oanda-environment string Enum
The environment to run in, Practice for fxTrade Practice, Trade for fxTrade. Options : ['Practice', 'Trade']
Example +
+{
+  "id": "string",
+  "oanda-account-id": "string",
+  "oanda-access-token": "string",
+  "oanda-environment": "Practice"
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZerodhaSettings Model - Settings for using Zerodha as a data provider or brokerage.
id string
Brokerage ID, this is, ZerodhaBrokerage.
zerodha-api-key string
Your Kite Connect API key.
zerodha-access-token string
Your Kite Connect access token.
zerodha-product-type string Enum
The product type must be set to MIS if you are targeting intraday products, CNC if you are targeting delivery products or NRML if you are targeting carry forward products. Options : ['mis', 'cnc', 'nrml']
zerodha-trading-segment string Enum
The trading segment must be set to 'equity' if you are trading equities on NSE or BSE, or 'commodity' if you are trading commodities on MCX. Options : ['equity', 'commodity']
zerodha-history-subscription bool
Whether you have a history API subscription for Zerodha.
Example +
+{
+  "id": "string",
+  "zerodha-api-key": "string",
+  "zerodha-access-token": "string",
+  "zerodha-product-type": "mis",
+  "zerodha-trading-segment": "equity",
+  "zerodha-history-subscription": 
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
SamcoSettings Model - Settings for using Samco as a data provider or brokerage.
id string
Brokerage ID, this is, SamcoBrokerage.
samco-client-id string
Your Samco account Client ID.
samco-client-password string
Your Samco account password.
samco-year-of-birth int
Your year of birth (YYYY) registered with Samco.
samco-product-type string Enum
MIS if you are targeting intraday products, CNC if you are targeting delivery products, NRML if you are targeting carry forward products. Options : ['mis', 'cnc', 'nrml']
samco-trading-segment string Enum
\'equity\' if you are trading equities on NSE or BSE, commodity if you are trading \'commodities\' on MCX. Options : ['equity', 'commodity']
Example +
+{
+  "id": "string",
+  "samco-client-id": "string",
+  "samco-client-password": "string",
+  "samco-year-of-birth": ,
+  "samco-product-type": "mis",
+  "samco-trading-segment": "equity"
+}
+
+
+ + + + + + + + + + + + + + + + + + +
WolverineSettings Model - Settings for using Wolverine Execution Services as a brokerage.
id string
Brokerage ID, this is, WolverineBrokerage.
wolverine-on-behalf-of-comp-id string
Value used to identify the trading firm.
wolverine-account string
Wolverine Execution Services account name.
Example +
+{
+  "id": "string",
+  "wolverine-on-behalf-of-comp-id": "string",
+  "wolverine-account": "string"
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + +
TDAmeritradeSettings Model - Settings for using TDAmeritrade as a data provider or brokerage.
id string
Brokerage ID, this is, TDAmeritradeBrokerage.
tdameritrade-api-key string
Your TDAmeritrade API key.
tdameritrade-access-token string
Your TDAmeritrade OAuth Access Token.
tdameritrade-account-number string
Your TDAmeritrade account number.
Example +
+{
+  "id": "string",
+  "tdameritrade-api-key": "string",
+  "tdameritrade-access-token": "string",
+  "tdameritrade-account-number": "string"
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TradingTechnologiesSettings Model - Settings for using Trading Technologies as a brokerage.
id string
Brokerage ID, this is, TradingTechnologiesBrokerage.
tt-user-name string
Trading Technologies user name.
tt-session-password string
Trading Technologies session password.
tt-account-name string
Trading Technologies account name.
tt-rest-app-key string
Trading Technologies App key.
tt-rest-app-secret string
Trading Technologies App secret.
tt-rest-environment string Enum
Environment in which the brokerage Trading Technologies will be used. Options : ['live', 'uat']
tt-order-routing-sender-comp-id string
Trading Technologies routing sender.
Example +
+{
+  "id": "string",
+  "tt-user-name": "string",
+  "tt-session-password": "string",
+  "tt-account-name": "string",
+  "tt-rest-app-key": "string",
+  "tt-rest-app-secret": "string",
+  "tt-rest-environment": "live",
+  "tt-order-routing-sender-comp-id": "string"
+}
+
+
+ + + + + + + + + + + + + + + + + + +
RBIBrokerageSettings Model - Settings for using RBI as a brokerage.
id string
Brokerage ID, this is, RBIBrokerage.
rbi-on-behalf-of-comp-id string
Value used to identify the trading firm.
rbi-account string
RBI account name.
Example +
+{
+  "id": "string",
+  "rbi-on-behalf-of-comp-id": "string",
+  "rbi-account": "string"
+}
+
+
+ + + + + + + + + + + + + + + +
TerminalLinkSettings Model - Settings for using TerminalLink as a brokerage.
id string
Brokerage ID, this is TerminalLinkBrokerage.
terminal-link-connection-type string Enum
Terminal Link Connection Type [DAPI, SAPI]. Options : ['DAPI', 'SAPI']
Example +
+{
+  "id": "string",
+  "terminal-link-connection-type": "DAPI"
+}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Holding Model - Live results object class for packaging live result data.
Symbol Symbol object
Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security.
Type string Enum
Type of tradable security / underlying asset. Options : ['Base', 'Equity', 'Option', 'Commodity', 'Forex', 'Future', 'Cfd', 'Crypto']
CurrencySymbol string
example: $

The currency symbol of the holding.
AveragePrice number
Average Price of our Holding in the currency the symbol is traded in.
Quantity number
Quantity of the Symbol we hold.
MarketPrice number
Current Market Price of the Asset in the currency the symbol is traded in.
ConversionRate number
Current market conversion rate into the account currency.
MarketValue number
Current market value of the holding.
UnrealizedPnl number
Current unrealized P/L of the holding.
Example +
+{
+  "Symbol": {
+    "value": "string",
+    "id": "string",
+    "permtick": "string"
+  },
+  "Type": "Base",
+  "CurrencySymbol": "$",
+  "AveragePrice": 0,
+  "Quantity": 0,
+  "MarketPrice": 0,
+  "ConversionRate": 0,
+  "MarketValue": 0,
+  "UnrealizedPnl": 0
+}
+
+
+ + + + + + + + + + + + + + + + + + +
Symbol Model - Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security.
value string
The current symbol for this ticker.
id string
The security identifier for this symbol.
permtick string
The current symbol for this ticker.
Example +
+{
+  "value": "string",
+  "id": "string",
+  "permtick": "string"
+}
+
+
+ + + + + + + + + + + + +
SecurityType Model - Type of tradable security / underlying asset.
SecurityType string Enum
Type of tradable security / underlying asset. Options : ['Base', 'Equity', 'Option', 'Commodity', 'Forex', 'Future', 'Cfd', 'Crypto']
Example +
+{
+  "SecurityType": "Base"
+}
+
+
+ + + + + + + + + + + + + + +
CashAmount Model - Represents a cash amount which can be converted to account currency using a currency converter.
amount number
The amount of cash.
currency string
The currency in which the cash amount is denominated.
Example +
+{
+  "amount": 0,
+  "currency": "string"
+}
+
+
\ No newline at end of file diff --git a/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/03 Portfolio State/03 Responses.html b/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/03 Portfolio State/03 Responses.html index 222e6c71f4..25397c6bbe 100644 --- a/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/03 Portfolio State/03 Responses.html +++ b/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/03 Portfolio State/03 Responses.html @@ -21,9 +21,9 @@

200 Success

"portfolio": { "Holdings": { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "Type": "Base", "CurrencySymbol": "$", @@ -65,9 +65,9 @@

200 Success

{ "Holdings": { "Symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "Type": "Base", "CurrencySymbol": "$", @@ -128,9 +128,9 @@

200 Success

 {
   "Symbol": {
-    "Value": "string",
-    "ID": "string",
-    "Permtick": "string"
+    "value": "string",
+    "id": "string",
+    "permtick": "string"
   },
   "Type": "Base",
   "CurrencySymbol": "$",
@@ -151,22 +151,22 @@ 

200 Success

-Value string
The current symbol for this ticker. +value string
The current symbol for this ticker. -ID string
The security identifier for this symbol. +id string
The security identifier for this symbol. -Permtick string
The current symbol for this ticker. +permtick string
The current symbol for this ticker. Example
 {
-  "Value": "string",
-  "ID": "string",
-  "Permtick": "string"
+  "value": "string",
+  "id": "string",
+  "permtick": "string"
 }
diff --git a/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/04 Orders/03 Responses.html b/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/04 Orders/03 Responses.html index a96d754752..1eb656067b 100644 --- a/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/04 Orders/03 Responses.html +++ b/01 Cloud Platform/99 API Reference/07 Live Management/02 Read Live Algorithm/04 Orders/03 Responses.html @@ -35,9 +35,9 @@

200 Success

"string" ], "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "limitPrice": , "stopPrice": 0, @@ -57,9 +57,9 @@

200 Success

"direction": 0 = Buy, "value": 0, "orderSubmissionData": { - "BidPrice": 0, - "AskPrice": 0, - "LastPrice": 0 + "bidPrice": 0, + "askPrice": 0, + "lastPrice": 0 }, "isMarketable": true, "properties": { @@ -74,9 +74,9 @@

200 Success

"orderEventId": 0, "id": 0, "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "status": "new", "orderFeeAmount": 0, @@ -226,9 +226,9 @@

200 Success

"string" ], "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "limitPrice": , "stopPrice": 0, @@ -248,9 +248,9 @@

200 Success

"direction": 0 = Buy, "value": 0, "orderSubmissionData": { - "BidPrice": 0, - "AskPrice": 0, - "LastPrice": 0 + "bidPrice": 0, + "askPrice": 0, + "lastPrice": 0 }, "isMarketable": true, "properties": { @@ -265,9 +265,9 @@

200 Success

"orderEventId": 0, "id": 0, "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "status": "new", "orderFeeAmount": 0, @@ -310,22 +310,22 @@

200 Success

-Value string
The current symbol for this ticker. +value string
The current symbol for this ticker. -ID string
The security identifier for this symbol. +id string
The security identifier for this symbol. -Permtick string
The current symbol for this ticker. +permtick string
The current symbol for this ticker. Example
 {
-  "Value": "string",
-  "ID": "string",
-  "Permtick": "string"
+  "value": "string",
+  "id": "string",
+  "permtick": "string"
 }
@@ -337,22 +337,22 @@

200 Success

-BidPrice number
The bid price at an order submission time. +bidPrice number
The bid price at an order submission time. -AskPrice number
The ask price at an order submission time. +askPrice number
The ask price at an order submission time. -LastPrice number
The current price at an order submission time. +lastPrice number
The current price at an order submission time. Example
 {
-  "BidPrice": 0,
-  "AskPrice": 0,
-  "LastPrice": 0
+  "bidPrice": 0,
+  "askPrice": 0,
+  "lastPrice": 0
 }
@@ -457,9 +457,9 @@

200 Success

"orderEventId": 0, "id": 0, "symbol": { - "Value": "string", - "ID": "string", - "Permtick": "string" + "value": "string", + "id": "string", + "permtick": "string" }, "status": "new", "orderFeeAmount": 0, diff --git a/QuantConnect-Platform-2.0.0.yaml b/QuantConnect-Platform-2.0.0.yaml index d43e8dd411..fc924f558f 100644 --- a/QuantConnect-Platform-2.0.0.yaml +++ b/QuantConnect-Platform-2.0.0.yaml @@ -3741,15 +3741,15 @@ components: OrderSubmissionData: type: object properties: - BidPrice: + bidPrice: type: number description: The bid price at an order submission time. format: float - AskPrice: + askPrice: type: number description: The ask price at an order submission time. format: float - LastPrice: + lastPrice: type: number description: The current price at an order submission time. format: float @@ -4530,13 +4530,13 @@ components: Symbol: type: object properties: - Value: + value: type: string description: The current symbol for this ticker. - ID: + id: type: string description: The security identifier for this symbol. - Permtick: + permtick: type: string description: The current symbol for this ticker. description: Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security. diff --git a/code-generators/API-Reference-Code-Generator.py b/code-generators/API-Reference-Code-Generator.py index 922fbccdf0..6fb4c3da54 100644 --- a/code-generators/API-Reference-Code-Generator.py +++ b/code-generators/API-Reference-Code-Generator.py @@ -329,13 +329,28 @@ def ExampleWriting(request_object_properties, item_list, array=False, order=0): if "enum" in properties: type_ += " Enum" - description_ += f' Options : {properties["enum"]}' + def parse_properties(properties): + ref_properties = [x.get("$ref", x).split('/')[1:] for x in properties if isinstance(x, dict)] + for ref in ref_properties: + item_list.append(ref) + return [x[-1] for x in ref_properties] if ref_properties else properties + description_ += f' Options : {parse_properties(properties["enum"])}' + property = properties["enum"][0] + ref = property.get("$ref") if isinstance(property, dict) else None + if ref: + request_object_ = doc + for item in ref.split("/")[1:]: + request_object_ = request_object_[item] + + if "properties" in request_object_: + request_object_properties_ = request_object_["properties"] + property, __, __ = ExampleWriting(request_object_properties_, item_list, order=order+1) + if "string" in type_: - example_ = tab + f' "{name}": "{properties["enum"][0]}"' - + example_ = tab + f' "{name}": "{property}"' else: - example_ = tab + f' "{name}": {properties["enum"][0]}' + example_ = tab + f' "{name}": {property}' if "example" in properties: eg = properties["example"]