Expand description
The watchlist file: <scope home>/watchlists/<name>.yaml.
name: stablecoins
interval: 30s
duration: 1h # optional; absent or `forever` = until stopped
outputs:
csv: ./watch.csv
report: ./watch.md
targets:
- kind: pair
id: USDC
venue: binance # or a list: [binance, weex]
preset: market health
health:
max_spread_pct: 0.5
- kind: token
id: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
chain: ethereum
rules:
- holders >= 1000
- liquidity_usd > 1000000parse and to_text are the only functions that touch the YAML
crate (#47, N7). parse reports every error with its line, not only
the first.
Structs§
- File
Error - One problem in a watchlist file.
- File
Errors - Every problem in a watchlist file, one per line of the message.
Constants§
- EXTENSION
- The file extension of a watchlist.
Functions§
- list
- The watchlist names in
dir, sorted. A missing folder has none. - load
- Reads the watchlist at
path. A file with noname:takes its stem. - parse
- Parses a watchlist file’s text.
default_namenames a file with noname:. Withvenues, a venue must be one of them. - path_in
- The file of the watchlist
nameindir. - save
- Writes
wtopath, creating its folder. - to_text
- The file text of
w.parsereads it back equal.