Skip to content
Crifine

@crifine/cli

Pre-trade checks from the terminal and from CI, with exit codes a pipeline can branch on.

npm install -g @crifine/cli

crifine exit aave-v3-weth --size 5m
crifine decide aave-v3-weth --size 5m --max-gap -2 --min-days 30
crifine compare WETH --size 1m
crifine watch uniswap-v3-zec --size 500k --threshold -4
crifine verify https://crifine.app/api/v1/exit/aave-v3-weth
crifine board

Exit codes

CodeMeaning
0Gap inside the threshold
1Gap crossed the threshold
2Size exceeds the observed book — no price available
3Underlying market is closed
4Network, API or usage error
Gate a pipeline
crifine decide aave-v3-weth --size 5m --max-gap -2
case $? in
  0) place_order ;;
  1) echo "book too thin"; place_smaller_order ;;
  2) echo "past the observed book — not proceeding"; exit 1 ;;
  3) echo "market closed — deferring" ;;
  *) exit 1 ;;
esac

crifine watch polls until a threshold is crossed and then exits with the code that says why. --max-checks bounds it so it can live in a script rather than only in a terminal someone is staring at. Progress goes to stderr, so --json on stdout stays a single parseable object.