Idea for CREATE SPREAD

This commit is contained in:
斟酌 鵬兄 2022-10-19 22:04:11 +08:00
parent 3ea6236165
commit 2cffa5c78c

View File

@ -1,7 +1,7 @@
# Table of Contents # Table of Contents
* [Action Statements](#action-statements) * [Action Statements](#action-statements)
* [CREATE EXCHANGE](#create-exchange-statement) * [CREATE EXCHANGE](#create-exchange-statement)
* [CREATE PRODUCT](#create-product-statement) * [CREATE SPREAD](#create-spread)
* [SELL](#sell-statement) * [SELL](#sell-statement)
* [BUY](#buy-statement) * [BUY](#buy-statement)
* [Functions](#functions) * [Functions](#functions)
@ -27,16 +27,20 @@ CREATE EXCHANGE 'IB' TYPE IB_API
URI 'https://127.0.0.1:11590/' URI 'https://127.0.0.1:11590/'
``` ```
## CREATE PRODUCT Statement ## CREATE SPREAD Statement
This is a shortcut function to create a buy/sell order pairs with hedge triggers
``` ```
CREATE PRODUCT [Name] AS [Exchange].[Product] TODO
``` ```
### Examples ### Examples
``` ```
CREATE PRODUCT 'QQQ' AS "IB"."QQQ" CREATE SPREAD OF 10 BTC FOR QQQToken FROM "CryptoExchange"
HEDGE BTC FOR USD FROM "CryptoExchange"
HEDGE QQQToken FOR QQQ FROM "StockExchange"
``` ```
## SELL Statement ## SELL Statement
``` ```
[SELL] [Units] OF [Product] [SELL] [Units] OF [Product]