foreseek

n8n community node for Foreseek prediction market trading

Package Information

Downloads: 59 weekly / 69 monthly
Latest Version: 1.0.0

Documentation

n8n-nodes-foreseek

n8n community node for Foreseek prediction market trading. Use natural language to parse predictions, trade on Kalshi, and manage positions from your n8n workflows.

Installation

n8n Cloud

  1. Open SettingsCommunity NodesInstall.
  2. Enter n8n-nodes-foreseek and install.
  3. Add your Foreseek API credentials when you use the node.

Self-hosted n8n

  1. Install the package in your n8n custom nodes folder:
    cd ~/.n8n/custom
    npm install n8n-nodes-foreseek
    
  2. Restart n8n.
  3. The Foreseek node appears under the Transform group.

Local development

  1. Clone the repository and install dependencies:
    git clone https://github.com/foreseek-ai/n8n-nodes-foreseek.git
    cd n8n-nodes-foreseek
    npm install
    
  2. Build:
    npm run build
    
  3. Link or copy into n8n custom nodes:
    cp -r . ~/.n8n/custom/node_modules/n8n-nodes-foreseek
    
  4. Restart n8n.

Authentication

  1. Get your API key from Foreseek Dashboard.
  2. In n8n, add a Foreseek API credential (when you add a Foreseek node, you’ll be prompted).
  3. Paste your API key and save.

Operations

Operation Description
Parse Match a natural language prediction to markets
Trade Execute a buy/sell (market or limit)
Positions List open positions
Markets Search markets by query/category
Orders List pending orders
Cancel Cancel an order by ID
Status Check tier and usage
Balance Get account balance
Watchlist List saved markets

Parse

  • Prediction (required): e.g. "Bitcoin will hit $120k by end of month"

Trade

  • Ticker (required): e.g. KXBTC-120K-JAN
  • Side: Yes / No
  • Action: Buy / Sell (default: Buy)
  • Count (required): Number of contracts (min 1)
  • Type: Market / Limit (default: Market)
  • Yes Price / No Price: Shown when Type = Limit and Side = Yes / No

Markets

  • Query: Search text (optional)
  • Category: Politics, Economics, Crypto, Sports, Science, Entertainment, Other (optional)
  • Limit: 1–50 (default: 10)

Cancel

  • Order ID (required): ID of the order to cancel.

Rate limits

Same as the Foreseek CLI:

  • Free: ~5 predictions/day
  • Pro: ~75 predictions/day
  • Ultra: ~200 predictions/day

Example workflows

Slack prediction bot

  1. Trigger: Slack message containing /predict.
  2. Foreseek node: Parse with prediction from the message.
  3. If a market is matched → Slack reply with market details and price.

WhatsApp trade executor

  1. Trigger: Incoming WhatsApp message.
  2. Foreseek Parse on the message text.
  3. If user confirms → Foreseek Trade → WhatsApp confirmation.

Daily portfolio summary

  1. Trigger: Schedule (e.g. daily 9:00).
  2. Foreseek Positions and Balance.
  3. Email or Slack with portfolio summary.

See example-workflow.json for an importable workflow.

API

  • Endpoint: https://jxvtetqmzduvhgiyldgp.supabase.co/functions/v1/foreseek-cli
  • Auth: Authorization: Bearer {API_KEY}
  • Content-Type: application/json

Troubleshooting

Issue Action
Invalid API key (401) Check the key in Foreseek Dashboard and in the n8n credential.
Rate limited (429) Wait or upgrade your tier; check Status for usage.
Scope not allowed (403) Your plan may not include the operation; check tier/scope.
Node not found Ensure the package is in ~/.n8n/custom/node_modules/ and n8n was restarted.

License

MIT

Links

Discussion