MMQLEngine/specifications/0002_statement_structurs.md

51 lines
882 B
Markdown
Raw Permalink Normal View History

2022-10-21 12:49:35 +00:00
#### Example Statement
```
BUY 1 SHARES OF BTC_ETF
FOR 10 USD
FROM "MyBrokerAccount"
WITH LIMIT OF PURCHASING_POWER( "MyBrokerAccount", "QQQ" )
FOR EVERY
1 BTC OF USD_BTC SOLD
FROM "CoinBase"
```
#### Yield Structure
```
{
Statement: BUY
2022-10-21 20:10:27 +00:00
FinancialInstrument: {
2022-10-21 12:49:35 +00:00
Name: BTC_ETF
Amount: {
Value: 1
Unit: SHARES
}
}
For: {
Value: 10
Unit: USD
}
From: MyBrokerAccount
Limit: {
Amount: {
Func: {
Name: PURCHASING_POWER
Params [
MyBrokerAccount
QQQ
]
}
}
}
When: [{
Event: SOLD
Params: {
Amount: {
Value: 1
Unit: BTC
}
From: CoinBase
}
}]
}
```