Created
January 26, 2019 16:18
-
-
Save pyldin601/42aef0a313ebf0f7f018fe92d97676d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const strategy = { | |
id: '00000000-0000-0000-0000-000000000001', | |
type: 'CHAIN', | |
payload: { | |
actions: [ | |
{ | |
id: '00000000-0000-0000-0000-000000000002', | |
type: 'TRAILING_SELL', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
quantity: 100, | |
quantityUnits: 'percent', | |
distance: 3, | |
distanceUnits: 'percent', | |
}, | |
}, | |
{ | |
id: '00000000-0000-0000-0000-000000000003', | |
type: 'TRAILING_BUY', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
quantity: 100, | |
quantityUnits: 'basePercent', | |
distance: 3, | |
distanceUnits: 'percent', | |
}, | |
}, | |
{ | |
id: '00000000-0000-0000-0000-000000000004', | |
type: 'OR', | |
payload: { | |
actions: [ | |
{ | |
id: '00000000-0000-0000-0000-000000000005', | |
type: 'CHAIN', | |
payload: { | |
actions: [ | |
{ | |
id: '00000000-0000-0000-0000-000000000006', | |
type: 'STOP_LOSS', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
quantity: 100, | |
quantityUnits: 'percent', | |
stopRate: 3500, | |
}, | |
}, | |
], | |
}, | |
}, | |
{ | |
id: '00000000-0000-0000-0000-000000000007', | |
type: 'CHAIN', | |
payload: { | |
actions: [ | |
{ | |
id: '00000000-0000-0000-0000-000000000008', | |
type: 'WAIT_FOR_RATE', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
rate: 4500, | |
operator: '>=', | |
}, | |
}, | |
{ | |
id: '00000000-0000-0000-0000-000000000009', | |
type: 'TRAILING_SELL', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
quantity: 100, | |
quantityUnits: 'percent', | |
distance: 5, | |
distanceUnits: 'percent', | |
}, | |
}, | |
{ | |
id: '00000000-0000-0000-0000-000000000010', | |
type: 'AND', | |
payload: { | |
actions: [ | |
{ | |
id: '00000000-0000-0000-0000-000000000011', | |
type: 'CHAIN', | |
payload: { | |
actions: [ | |
{ | |
id: '00000000-0000-0000-0000-000000000012', | |
type: 'MARKET_BUY', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
quantity: 100, | |
quantityUnits: 'baseCoin', | |
}, | |
}, | |
{ | |
id: '00000000-0000-0000-0000-000000000013', | |
type: 'MARKET_SELL', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
quantity: 100, | |
quantityUnits: 'percent', | |
}, | |
}, | |
], | |
}, | |
}, | |
{ | |
id: '00000000-0000-0000-0000-000000000014', | |
type: 'CHAIN', | |
payload: { | |
actions: [ | |
{ | |
id: '00000000-0000-0000-0000-000000000015', | |
type: 'LIMIT_BUY', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
rate: 4500, | |
quantity: 100, | |
quantityUnits: 'baseCoin', | |
}, | |
}, | |
{ | |
id: '00000000-0000-0000-0000-000000000016', | |
type: 'LIMIT_SELL', | |
payload: { | |
exchange: 'binance', | |
market: 'USDT-BTC', | |
rate: 4500, | |
quantity: 100, | |
quantityUnits: 'percent', | |
}, | |
}, | |
], | |
}, | |
}, | |
], | |
}, | |
}, | |
], | |
}, | |
}, | |
], | |
}, | |
}, | |
], | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment