This idea may work, or may not
This commit is contained in:
50
specifications/0002_statement_structurs.md
Normal file
50
specifications/0002_statement_structurs.md
Normal file
@@ -0,0 +1,50 @@
|
||||
#### 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
|
||||
Product: {
|
||||
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
|
||||
}
|
||||
}]
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user