-
Notifications
You must be signed in to change notification settings - Fork 1
Example bot configuration file
sterlinb edited this page Aug 7, 2020
·
2 revisions
Example bot configuration file. All attributes are strictly required except "floodLimit" (which defaults to 100) and "requestIDStart" (which defaults to 1). Setting "requestIDStart" is functionally required when connecting to a real server, as they require request ID values not be reused.
{
"wsEndpoint":"wss://uat.zubr.io/api/v1/ws",
"bysonEndpoint":"10.226.33.107",
"bysonPort":12345,
"bysonLogin":1234567891,
"bysonAccount":1234567891011,
"instrument":1,
"quoteSize":10,
"initialPosition":-12,
"maxPosition":1000,
"interest":1.0,
"shift":0.01,
"priceIncrement":0.1,
"requestIDStart":326574,
"floodLimit":100
}
Breakdown of attributes:
- Access point attributes
- wsEndpoint: Endpoint for connecting to the ZUBR WebSocket API. Value shown is for testnet.
- bysonEndpoint: IP address for BYSON connection. Value shown is the published testnet IP.
- bysonPort: Port number for BYSON connection. Value shown is used for testnet.
- bysonLogin: Login ID provided by ZUBR. Value shown is a dummy, you will need a real one that is linked to the IP address of your bot.
- bysonAccount: Account ID provided by ZUBR. Value shown is a dummy, you will need a real one.
- Trading attributes
- instrument: ID number for the instrument to trade. Currently 1-3 are meaningful. Values appropriate for other trading attributes depend on this.
- quoteSize: The size of orders the bot will place, when not constrained by maxPosition.
- initialPosition: The initial position held by the account. Or so the bot will believe, it does not check its internal position tracking against server information.
- maxPosition: The maximum position the bot can trade to, in either the positive or negative direction.
- interest: pricing strategy parameter that determines the spacing of bot bid and ask prices.
- shift: pricing strategy parameter that causes robot order placement to lean towards zero position.
- priceIncrement: Granularity of instrument pricing. Depends on instrument. Order prices will be rounded to a multiple of this. If set incorrectly may cause orders to be rejected.
- Connection attributes
- requestIDStart: First request ID for the bot to use in the current run. Request IDs cannot be reused in separate sessions! The bot tries to log or print the last used request ID when exiting, which should be used to set this attribute for the next run.
- floodLimit: The bot will avoid placing this many requests within a single second so as not to trigger penalties. 100 is the correct limit currently.