Package com.qtsurfer.api.client.model
Class LivePaperConfig
java.lang.Object
com.qtsurfer.api.client.model.LivePaperConfig
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.24.0")
public class LivePaperConfig
extends Object
Paper trading for this run: the same economics as a backtest's `baseConfig` (same fields, defaults and limits), plus `output` and `accounts`. An empty object takes every default. By default each quote currency the run trades gets its own simulated account, opened with `initialFunding` in that currency; with `accounts: instrument` each instrument gets one instead. Accounts are never added together. As returned on a run, the block is normalised: `feeRate` is resolved into `buyFeeRate`/`sellFeeRate` and defaults are filled in; `accounts` is returned when the request gave it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the run's accounts are split, fixed when it starts.static enumWhich asset fees are charged in.static enum`separate` keeps paper output out of the run's signals (read it with `GET /live/{runId}/paper`); `mix` also interleaves it into the run's signals as `type: paper`, right after the signal that caused it. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccounts(LivePaperConfig.AccountsEnum accounts) buyFeeRate(Double buyFeeRate) booleanReturn true if this LivePaperConfig object is equal to o.feeLeg(LivePaperConfig.FeeLegEnum feeLeg) How the run's accounts are split, fixed when it starts.Buy-side fee rate; overrides `feeRate`.Which asset fees are charged in.Fee rate for both sides (0.001 = 0.1%).Starting capital of each account, in that account's own quote currency.`separate` keeps paper output out of the run's signals (read it with `GET /live/{runId}/paper`); `mix` also interleaves it into the run's signals as `type: paper`, right after the signal that caused it.Share of the account's free balance each entry locks, in percent.Sell-side fee rate; overrides `feeRate`.inthashCode()initialFunding(Double initialFunding) output(LivePaperConfig.OutputEnum output) percentAmountToLock(Double percentAmountToLock) sellFeeRate(Double sellFeeRate) voidsetAccounts(LivePaperConfig.AccountsEnum accounts) voidsetBuyFeeRate(Double buyFeeRate) voidsetFeeLeg(LivePaperConfig.FeeLegEnum feeLeg) voidsetFeeRate(Double feeRate) voidsetInitialFunding(Double initialFunding) voidsetOutput(LivePaperConfig.OutputEnum output) voidsetPercentAmountToLock(Double percentAmountToLock) voidsetSellFeeRate(Double sellFeeRate) toString()Convert the instance into URL query string.toUrlQueryString(String prefix) Convert the instance into URL query string.
-
Field Details
-
JSON_PROPERTY_INITIAL_FUNDING
- See Also:
-
JSON_PROPERTY_FEE_RATE
- See Also:
-
JSON_PROPERTY_BUY_FEE_RATE
- See Also:
-
JSON_PROPERTY_SELL_FEE_RATE
- See Also:
-
JSON_PROPERTY_FEE_LEG
- See Also:
-
JSON_PROPERTY_PERCENT_AMOUNT_TO_LOCK
- See Also:
-
JSON_PROPERTY_OUTPUT
- See Also:
-
JSON_PROPERTY_ACCOUNTS
- See Also:
-
-
Constructor Details
-
LivePaperConfig
public LivePaperConfig()
-
-
Method Details
-
initialFunding
-
getInitialFunding
Starting capital of each account, in that account's own quote currency. With `accounts: instrument` it is the capital of EACH instrument's account: it is never the run's total capital and accounts are never added together. minimum: 0 maximum: 1000000000- Returns:
- initialFunding
-
setInitialFunding
-
feeRate
-
getFeeRate
Fee rate for both sides (0.001 = 0.1%). Accepted on start; returned resolved into the two fields below. minimum: 0- Returns:
- feeRate
-
setFeeRate
-
buyFeeRate
-
getBuyFeeRate
Buy-side fee rate; overrides `feeRate`. minimum: 0- Returns:
- buyFeeRate
-
setBuyFeeRate
-
sellFeeRate
-
getSellFeeRate
Sell-side fee rate; overrides `feeRate`. minimum: 0- Returns:
- sellFeeRate
-
setSellFeeRate
-
feeLeg
-
getFeeLeg
Which asset fees are charged in. Case-insensitive on start.- Returns:
- feeLeg
-
setFeeLeg
-
percentAmountToLock
-
getPercentAmountToLock
Share of the account's free balance each entry locks, in percent. Omitted, the strategy's own setting applies, and without one 10% (the whole free balance, as a backtest, with `accounts: instrument`, where nothing is shared). minimum: 0 maximum: 100- Returns:
- percentAmountToLock
-
setPercentAmountToLock
-
output
-
getOutput
`separate` keeps paper output out of the run's signals (read it with `GET /live/{runId}/paper`); `mix` also interleaves it into the run's signals as `type: paper`, right after the signal that caused it.- Returns:
- output
-
setOutput
-
accounts
-
getAccounts
How the run's accounts are split, fixed when it starts. `currency` (the default) is one shared account per quote currency: every instrument of a currency draws on the same balance, as on a venue with one wallet per asset. `instrument` is one isolated account per instrument, each a simulation of that instrument alone with its own `initialFunding`, which is what makes it comparable with a backtest of the instrument but less realistic, since a venue has one wallet per asset and not one per pair. It needs the instruments of the run named: a wildcard is refused, on every plan.- Returns:
- accounts
-
setAccounts
-
equals
Return true if this LivePaperConfig object is equal to o. -
hashCode
public int hashCode() -
toString
-
toUrlQueryString
Convert the instance into URL query string.- Returns:
- URL query string
-
toUrlQueryString
Convert the instance into URL query string.- Parameters:
prefix- prefix of the query string- Returns:
- URL query string
-