Paper

Paper Exchange #

The paper exchange is used to execute orders in a sandbox environment without affecting any account data in the live exchange. The wrapped source exchange is used only for live market data retrieval.

Configuration #

{
	"type": "paper",
	"source": {
		"type": "binance",
		"key": "cQoRSm21nyovtTcufM8Si2IBHtNuzVYSfiklQmbt3EHgnqpbwhRmyCRtoiaE",
		"secret": "qXN4yR2KXQzs7c0DcXWVEOSNIhTrvGGoqWrXIkrE1PzmBd4L1OIQWJ1qMZAE"
	},
	"positions": {
		"BTC": {
			"quantity": "0.5"
		},
		"ETH": {
			"quantity": "0.3"
		},
		"LTC": {
			"quantity": "0.4"
		}
	},
	"cash": {
		"asset": "USD",
		"quantity": "300.42"
	}
}
  • type - string
    The type of the exchange configuration.

    Exchange configuration types are described in detail here.

  • source - object
    The wrapped live exchange from which all market data is retrieved.

    The source exchange adheres to the same structuring rules as the top-level exchanges. These rules are described in detail here. Note that only live exchanges can be used as the paper exchange’s source.

  • positions - map (string: object; optional; default: unused)
    The map of positions that is used when executing orders. Position object properties are:

    • quantity - string (decimal)
      The number of asset units that are owned.
      Although the map of positions is updated each time a new order is executed, all entries are reset to their initial values when the paper exchange configuration is (re)activated.
  • cash - object (optional; default: unused)
    The information about cash resources that is used when executing orders.

    • asset - string
      The asset that is being used as cash.

    • quantity - string (decimal)
      The available quantity of the cash asset.