Lean
$LEAN_TAG$
|
FTX Brokerage model More...
Public Member Functions | |
FTXBrokerageModel (AccountType accountType=AccountType.Margin) | |
Creates an instance of FTXBrokerageModel class More... | |
override decimal | GetLeverage (Security security) |
Gets the brokerage's leverage for the specified security More... | |
override IFeeModel | GetFeeModel (Security security) |
Provides FTX fee model More... | |
override IBenchmark | GetBenchmark (SecurityManager securities) |
Get the benchmark for this model More... | |
override bool | CanSubmitOrder (Security security, Order order, out BrokerageMessageEvent message) |
Returns true if the brokerage could accept this order. This takes into account order type, security type, and order size limits. More... | |
override bool | CanUpdateOrder (Security security, Order order, UpdateOrderRequest request, out BrokerageMessageEvent message) |
Please note that the order's queue priority will be reset, and the order ID of the modified order will be different from that of the original order. Also note: this is implemented as cancelling and replacing your order. There's a chance that the order meant to be cancelled gets filled and its replacement still gets placed. More... | |
Public Member Functions inherited from QuantConnect.Brokerages.DefaultBrokerageModel | |
DefaultBrokerageModel (AccountType accountType=AccountType.Margin) | |
Initializes a new instance of the DefaultBrokerageModel class More... | |
virtual bool | CanExecuteOrder (Security security, Order order) |
Returns true if the brokerage would be able to execute this order at this time assuming market prices are sufficient for the fill to take place. This is used to emulate the brokerage fills in backtesting and paper trading. For example some brokerages may not perform executions during extended market hours. This is not intended to be checking whether or not the exchange is open, that is handled in the Security.Exchange property. More... | |
virtual void | ApplySplit (List< OrderTicket > tickets, Split split) |
Applies the split to the specified order ticket More... | |
virtual IFillModel | GetFillModel (Security security) |
Gets a new fill model that represents this brokerage's fill behavior More... | |
virtual ISlippageModel | GetSlippageModel (Security security) |
Gets a new slippage model that represents this brokerage's fill slippage behavior More... | |
virtual ISettlementModel | GetSettlementModel (Security security) |
Gets a new settlement model for the security More... | |
ISettlementModel | GetSettlementModel (Security security, AccountType accountType) |
Gets a new settlement model for the security More... | |
virtual IBuyingPowerModel | GetBuyingPowerModel (Security security) |
Gets a new buying power model for the security, returning the default model with the security's configured leverage. For cash accounts, leverage = 1 is used. More... | |
virtual IShortableProvider | GetShortableProvider (Security security) |
Gets the shortable provider More... | |
virtual IMarginInterestRateModel | GetMarginInterestRateModel (Security security) |
Gets a new margin interest rate model for the security More... | |
IBuyingPowerModel | GetBuyingPowerModel (Security security, AccountType accountType) |
Gets a new buying power model for the security More... | |
Static Protected Member Functions | |
static IReadOnlyDictionary< SecurityType, string > | GetDefaultMarkets (string market) |
Returns a readonly dictionary of FTX default markets More... | |
Protected Attributes | |
virtual string | MarketName => Market.FTX |
market name More... | |
Properties | |
override IReadOnlyDictionary< SecurityType, string > | DefaultMarkets = GetDefaultMarkets(Market.FTX) [get] |
Gets a map of the default markets to be used for each security type More... | |
Properties inherited from QuantConnect.Brokerages.DefaultBrokerageModel | |
virtual AccountType | AccountType [get] |
Gets or sets the account type used by this model More... | |
virtual IReadOnlyDictionary< SecurityType, string > | DefaultMarkets [get] |
Gets a map of the default markets to be used for each security type More... | |
Properties inherited from QuantConnect.Brokerages.IBrokerageModel | |
AccountType | AccountType [get] |
Gets the account type used by this model More... | |
decimal | RequiredFreeBuyingPowerPercent [get] |
Gets the brokerages model percentage factor used to determine the required unused buying power for the account. From 1 to 0. Example: 0 means no unused buying power is required. 0.5 means 50% of the buying power should be left unused. More... | |
IReadOnlyDictionary< SecurityType, string > | DefaultMarkets [get] |
Gets a map of the default markets to be used for each security type More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from QuantConnect.Brokerages.DefaultBrokerageModel | |
static bool | IsValidOrderSize (Security security, decimal orderQuantity, out BrokerageMessageEvent message) |
Checks if the order quantity is valid, it means, the order size is bigger than the minimum size allowed More... | |
Public Attributes inherited from QuantConnect.Brokerages.DefaultBrokerageModel | |
virtual decimal | RequiredFreeBuyingPowerPercent => 0m |
Gets the brokerages model percentage factor used to determine the required unused buying power for the account. From 1 to 0. Example: 0 means no unused buying power is required. 0.5 means 50% of the buying power should be left unused. More... | |
Static Public Attributes inherited from QuantConnect.Brokerages.DefaultBrokerageModel | |
static readonly IReadOnlyDictionary< SecurityType, string > | DefaultMarketMap |
The default markets for the backtesting brokerage More... | |
FTX Brokerage model
Definition at line 29 of file FTXBrokerageModel.cs.
QuantConnect.Brokerages.FTXBrokerageModel.FTXBrokerageModel | ( | AccountType | accountType = AccountType.Margin | ) |
Creates an instance of FTXBrokerageModel class
accountType | Cash or Margin |
Definition at line 55 of file FTXBrokerageModel.cs.
|
virtual |
Gets the brokerage's leverage for the specified security
security | The security's whose leverage we seek |
Reimplemented from QuantConnect.Brokerages.DefaultBrokerageModel.
Definition at line 64 of file FTXBrokerageModel.cs.
|
virtual |
Provides FTX fee model
security | The security to get a fee model for |
Reimplemented from QuantConnect.Brokerages.DefaultBrokerageModel.
Reimplemented in QuantConnect.Brokerages.FTXUSBrokerageModel.
|
virtual |
Get the benchmark for this model
securities | SecurityService to create the security with if needed |
Reimplemented from QuantConnect.Brokerages.DefaultBrokerageModel.
Definition at line 87 of file FTXBrokerageModel.cs.
|
virtual |
Returns true if the brokerage could accept this order. This takes into account order type, security type, and order size limits.
For example, a brokerage may have no connectivity at certain times, or an order rate/size limit
security | The security of the order |
order | The order to be processed |
message | If this function returns false, a brokerage message detailing why the order may not be submitted |
Reimplemented from QuantConnect.Brokerages.DefaultBrokerageModel.
Definition at line 104 of file FTXBrokerageModel.cs.
|
virtual |
Please note that the order's queue priority will be reset, and the order ID of the modified order will be different from that of the original order. Also note: this is implemented as cancelling and replacing your order. There's a chance that the order meant to be cancelled gets filled and its replacement still gets placed.
security | The security of the order |
order | The order to be updated |
request | The requested update to be made to the order |
message | If this function returns false, a brokerage message detailing why the order may not be updated |
Reimplemented from QuantConnect.Brokerages.DefaultBrokerageModel.
Definition at line 183 of file FTXBrokerageModel.cs.
|
staticprotected |
Returns a readonly dictionary of FTX default markets
Definition at line 192 of file FTXBrokerageModel.cs.
|
protected |
market name
Definition at line 44 of file FTXBrokerageModel.cs.
|
get |
Gets a map of the default markets to be used for each security type
Definition at line 49 of file FTXBrokerageModel.cs.