polly-gamba 1.0.31 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -310,6 +310,7 @@ CLOSE RULES — apply ALL that match, no thesis override allowed:
310
310
  5. You have 2+ open positions in the SAME market with the SAME outcome — close the NEWER entry (higher ts value) regardless of P&L. Duplicate same-outcome positions double exposure without incremental edge. Keep the original entry.
311
311
  6. Position is UP >25% from entry AND has been held >48h — CLOSE to lock in profits. The market has moved significantly in your favor; gains are now vulnerable to reversion. Use take_profit reason. Exception: if the resolution event is within 7 days AND the position is still clearly on the right side, you may hold until resolution.
312
312
  7. STALE POSITION: Position held >7 days AND price has moved <5% from entry AND resolution event is >30 days away — CLOSE to redeploy capital. A position that doesn't move over 7 days means the mispricing wasn't as large as estimated. Cut it, accept the small loss/gain, and redeploy to markets with active price movement.
313
+ 8. CONCENTRATION VIOLATION: Count open positions by underlying theme (the single real-world event that resolves all of them). Examples: "Will Jesus return before GTA VI", "Will BTC hit $1M before GTA VI", "Will China invade Taiwan before GTA VI" all share the theme "GTA VI release date". Similarly "Will Spurs win NBA Finals", "Will OKC win NBA Finals", "Will Celtics win NBA Finals" all share the theme "2026 NBA Finals". If you have 3+ positions in the same theme, close the one with the smallest current edge (current price closest to 50/50 or furthest from your target) to reduce to 2 positions. Apply this BEFORE checking other rules.
313
314
 
314
315
  HOLD RULES: If NONE of the close rules apply and exit trigger NOT triggered, do nothing (no output needed).`;
315
316
  const msg = JSON.stringify({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polly-gamba",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "Coinbase price signal → Claude brain → Polymarket CLOB execution",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/service.log CHANGED
@@ -800,3 +800,230 @@ npm warn deprecated prebuild-install@7.1.3: No longer maintained. Please contact
800
800
  [gamma] Loaded 495 markets (filtered from 500)
801
801
  [expiring] 0 expiring markets for review
802
802
  [expiring] no expiring markets found this cycle
803
+ [polly-gamba] Starting paper trading service
804
+ [polly-gamba] Claude cwd: /Users/feral/polly-gamba
805
+ [polly-gamba] Expiring trader cwd: /Users/feral/polly-gamba-expiring
806
+ [coinbase-ws] Connecting to wss://ws-feed.exchange.coinbase.com
807
+ [polly-gamba] Listening for BTC/ETH price signals (threshold: 0.5% in 60s)...
808
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
809
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
810
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
811
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
812
+ [coinbase-ws] Connected
813
+ [gamma] Loaded 495 markets (filtered from 500)
814
+ [scan] 17 high-quality markets for autonomous review
815
+ [gamma] Loaded 495 markets (filtered from 500)
816
+ [expiring] 0 expiring markets for review
817
+ [expiring] no expiring markets found this cycle
818
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
819
+ [claude-trader:anthropic] ready
820
+ [claude-trader:ollama] ready
821
+ [claude-trader:expiring] ready
822
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
823
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
824
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
825
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
826
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
827
+ [gamma] Loaded 495 markets (filtered from 500)
828
+ [scan] 17 high-quality markets for autonomous review
829
+ [gamma] Loaded 495 markets (filtered from 500)
830
+ [expiring] 0 expiring markets for review
831
+ [expiring] no expiring markets found this cycle
832
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
833
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
834
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
835
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
836
+ [position-monitor] WARNING: no price data for 568629 YES — skipping review (market may be resolved or delisted)
837
+ [position-monitor] checked=25 review_candidates=6 hard_stops=0 (moved>5% or <72h expiry)
838
+ [gamma] Loaded 495 markets (filtered from 500)
839
+ [expiring] 0 expiring markets for review
840
+ [expiring] no expiring markets found this cycle
841
+ [gamma] Loaded 495 markets (filtered from 500)
842
+ [scan] 17 high-quality markets for autonomous review
843
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
844
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
845
+ [gamma] Loaded 495 markets (filtered from 500)
846
+ [scan] 17 high-quality markets for autonomous review
847
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
848
+ [expiring] 0 expiring markets for review
849
+ [expiring] no expiring markets found this cycle
850
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
851
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
852
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
853
+ [gamma] Loaded 495 markets (filtered from 500)
854
+ [scan] 17 high-quality markets for autonomous review
855
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
856
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
857
+ [expiring] 0 expiring markets for review
858
+ [expiring] no expiring markets found this cycle
859
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
860
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
861
+ [scan] failed to fetch markets: fetch failed
862
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
863
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
864
+ [gamma] Loaded 495 markets (filtered from 500)
865
+ [expiring] 0 expiring markets for review
866
+ [expiring] no expiring markets found this cycle
867
+ [position-monitor] WARNING: no price data for 566140 NO — skipping review (market may be resolved or delisted)
868
+ [position-monitor] WARNING: no price data for 540843 NO — skipping review (market may be resolved or delisted)
869
+ [position-monitor] WARNING: no price data for 568629 YES — skipping review (market may be resolved or delisted)
870
+ [position-monitor] checked=25 review_candidates=5 hard_stops=0 (moved>5% or <72h expiry)
871
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
872
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
873
+ [gamma] Loaded 495 markets (filtered from 500)
874
+ [scan] 16 high-quality markets for autonomous review
875
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
876
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
877
+ [expiring] 0 expiring markets for review
878
+ [expiring] no expiring markets found this cycle
879
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
880
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
881
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
882
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
883
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
884
+ [gamma] Loaded 495 markets (filtered from 500)
885
+ [scan] 16 high-quality markets for autonomous review
886
+ [gamma] Loaded 495 markets (filtered from 500)
887
+ [expiring] 0 expiring markets for review
888
+ [expiring] no expiring markets found this cycle
889
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
890
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
891
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
892
+ [gamma] Loaded 494 markets (filtered from 500)
893
+ [scan] 16 high-quality markets for autonomous review
894
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
895
+ [expiring] 0 expiring markets for review
896
+ [expiring] no expiring markets found this cycle
897
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
898
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
899
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
900
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
901
+ [expiring] failed to fetch markets: fetch failed
902
+ [position-monitor] WARNING: no price data for 568629 YES — skipping review (market may be resolved or delisted)
903
+ [position-monitor] checked=25 review_candidates=6 hard_stops=0 (moved>5% or <72h expiry)
904
+ [gamma] Loaded 494 markets (filtered from 500)
905
+ [scan] 16 high-quality markets for autonomous review
906
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
907
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
908
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
909
+ [gamma] Loaded 494 markets (filtered from 500)
910
+ [scan] 16 high-quality markets for autonomous review
911
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
912
+ [expiring] 0 expiring markets for review
913
+ [expiring] no expiring markets found this cycle
914
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
915
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
916
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
917
+ [gamma] Loaded 494 markets (filtered from 500)
918
+ [scan] 16 high-quality markets for autonomous review
919
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
920
+ [expiring] 0 expiring markets for review
921
+ [expiring] no expiring markets found this cycle
922
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
923
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
924
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
925
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
926
+ [expiring] failed to fetch markets: fetch failed
927
+ [gamma] Loaded 494 markets (filtered from 500)
928
+ [scan] 16 high-quality markets for autonomous review
929
+ [position-monitor] WARNING: no price data for 540843 NO — skipping review (market may be resolved or delisted)
930
+ [position-monitor] WARNING: no price data for 540819 NO — skipping review (market may be resolved or delisted)
931
+ [position-monitor] checked=25 review_candidates=6 hard_stops=0 (moved>5% or <72h expiry)
932
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
933
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
934
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
935
+ [gamma] Loaded 494 markets (filtered from 500)
936
+ [scan] 14 high-quality markets for autonomous review
937
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
938
+ [expiring] 0 expiring markets for review
939
+ [expiring] no expiring markets found this cycle
940
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
941
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
942
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
943
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
944
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
945
+ [gamma] Loaded 494 markets (filtered from 500)
946
+ [scan] 14 high-quality markets for autonomous review
947
+ [gamma] Loaded 494 markets (filtered from 500)
948
+ [expiring] 0 expiring markets for review
949
+ [expiring] no expiring markets found this cycle
950
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
951
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
952
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
953
+ [gamma] Loaded 494 markets (filtered from 500)
954
+ [scan] 14 high-quality markets for autonomous review
955
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
956
+ [expiring] 0 expiring markets for review
957
+ [expiring] no expiring markets found this cycle
958
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
959
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
960
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
961
+ [gamma] Loaded 494 markets (filtered from 500)
962
+ [scan] 14 high-quality markets for autonomous review
963
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
964
+ [expiring] 0 expiring markets for review
965
+ [expiring] no expiring markets found this cycle
966
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
967
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
968
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
969
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
970
+ [scan] failed to fetch markets: fetch failed
971
+ [expiring] failed to fetch markets: fetch failed
972
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
973
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
974
+ [signal] ETH down -0.50% @ $2,033.31 over 58s
975
+ [signal] ETH down 0.50% @ $2,033.31
976
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
977
+ [gamma] Loaded 485 markets (filtered from 500)
978
+ [match] 20 markets for ETH signal
979
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
980
+ [scan] 14 high-quality markets for autonomous review
981
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
982
+ [expiring] 0 expiring markets for review
983
+ [expiring] no expiring markets found this cycle
984
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
985
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
986
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
987
+ [gamma] Loaded 494 markets (filtered from 500)
988
+ [scan] 14 high-quality markets for autonomous review
989
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
990
+ [expiring] 0 expiring markets for review
991
+ [expiring] no expiring markets found this cycle
992
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
993
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
994
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
995
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
996
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
997
+ [gamma] Loaded 494 markets (filtered from 500)
998
+ [scan] 14 high-quality markets for autonomous review
999
+ [gamma] Loaded 494 markets (filtered from 500)
1000
+ [expiring] 0 expiring markets for review
1001
+ [expiring] no expiring markets found this cycle
1002
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
1003
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
1004
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
1005
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
1006
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
1007
+ [gamma] Loaded 494 markets (filtered from 500)
1008
+ [expiring] 0 expiring markets for review
1009
+ [expiring] no expiring markets found this cycle
1010
+ [gamma] Loaded 494 markets (filtered from 500)
1011
+ [scan] 14 high-quality markets for autonomous review
1012
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
1013
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
1014
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
1015
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
1016
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
1017
+ [gamma] Loaded 494 markets (filtered from 500)
1018
+ [scan] 14 high-quality markets for autonomous review
1019
+ [gamma] Loaded 494 markets (filtered from 500)
1020
+ [expiring] 0 expiring markets for review
1021
+ [expiring] no expiring markets found this cycle
1022
+ [position-monitor] checked=25 review_candidates=7 hard_stops=0 (moved>5% or <72h expiry)
1023
+ [scan] fetching high-quality markets (vol24h>$50k, liq>$50k, price 0.10-0.90)
1024
+ [gamma] Fetching active markets from https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=500
1025
+ [gamma] Loaded 494 markets (filtered from 500)
1026
+ [scan] 14 high-quality markets for autonomous review
1027
+ [expiring] fetching expiring markets (closing within 72h, vol24h>$10k, liq>$10k, price 0.05-0.95)
1028
+ [expiring] 0 expiring markets for review
1029
+ [expiring] no expiring markets found this cycle
@@ -362,6 +362,7 @@ CLOSE RULES — apply ALL that match, no thesis override allowed:
362
362
  5. You have 2+ open positions in the SAME market with the SAME outcome — close the NEWER entry (higher ts value) regardless of P&L. Duplicate same-outcome positions double exposure without incremental edge. Keep the original entry.
363
363
  6. Position is UP >25% from entry AND has been held >48h — CLOSE to lock in profits. The market has moved significantly in your favor; gains are now vulnerable to reversion. Use take_profit reason. Exception: if the resolution event is within 7 days AND the position is still clearly on the right side, you may hold until resolution.
364
364
  7. STALE POSITION: Position held >7 days AND price has moved <5% from entry AND resolution event is >30 days away — CLOSE to redeploy capital. A position that doesn't move over 7 days means the mispricing wasn't as large as estimated. Cut it, accept the small loss/gain, and redeploy to markets with active price movement.
365
+ 8. CONCENTRATION VIOLATION: Count open positions by underlying theme (the single real-world event that resolves all of them). Examples: "Will Jesus return before GTA VI", "Will BTC hit $1M before GTA VI", "Will China invade Taiwan before GTA VI" all share the theme "GTA VI release date". Similarly "Will Spurs win NBA Finals", "Will OKC win NBA Finals", "Will Celtics win NBA Finals" all share the theme "2026 NBA Finals". If you have 3+ positions in the same theme, close the one with the smallest current edge (current price closest to 50/50 or furthest from your target) to reduce to 2 positions. Apply this BEFORE checking other rules.
365
366
 
366
367
  HOLD RULES: If NONE of the close rules apply and exit trigger NOT triggered, do nothing (no output needed).`
367
368