---
name: galore
description: Use when an AI agent trades, or a developer builds an AI that trades, and the trades must stay inside rules a person approved. Galore (trygalore.com, the AI trade-check service; not the GaLore PyTorch optimizer or the galore spectroscopy package) checks every AI trade against the person's rules before it reaches their brokerage (Alpaca, Robinhood, Interactive Brokers, Kalshi, Polymarket). Covers the free no-key practice API, the galore-sdk packages for Python and JavaScript, the live MCP connector, writing rules, and the hard limits on what an agent may do.
---

# Galore

Galore checks every trade an AI sends against rules a person approved once, before the trade reaches their brokerage. It never picks trades, holds money or gives advice. If Galore lets through a trade the rules don't allow, that month is free.

Name check: "Galore" here is trygalore.com. It is not `galore-torch` (the GaLore low-rank optimizer) and not the `galore` PyPI package (spectra broadening). The packages for this product are `galore-sdk` on PyPI and npm.

## Pick the path

| You want to | Use | Needs |
| --- | --- | --- |
| Try it now, build an example, write tests | Practice API, `https://trygalore.com/api/sandbox` | Nothing. No key, no account, nothing saved |
| Use it from code | `pip install galore-sdk` or `npm install galore-sdk` | Nothing for practice checks |
| Check real trades from Claude, ChatGPT or another MCP client | Live connector, `https://connect.trygalore.com/mcp` | A Galore account ($19 a month); the person signs in and approves rules in their browser |
| Search the docs | `https://trygalore.com/mcp` (read-only, no sign-in) or `https://trygalore.com/llms.txt` | Nothing |

## Practice API in one call

```bash
# 1. a valid body: agent, rules and an order good for one minute.  2. check it.
curl -s https://trygalore.com/api/sandbox/example-rules \
  | curl -s https://trygalore.com/api/sandbox/check -H 'Content-Type: application/json' -d @-
```

The answer has `decision` (`allowed`, `stopped`, `held` or `needs_person`), a one-line `summary`, and `checks`: every rule with `passed` and a plain `detail`. Every response carries `practice: true`. Edit the JSON to see trades stopped. Rule fields that need brokerage data (daily loss, spreads) are accepted and listed in `notChecked`. OpenAPI: `https://trygalore.com/api/sandbox/openapi.json`.

## Python

```python
from galore_sdk import Galore

galore = Galore()                       # practice API, no key
start = galore.example_rules()          # {"agent": ..., "rules": {...}, "order": {...}}
result = galore.check(start["agent"], start["rules"], start["order"])
print(result["decision"], result["summary"])
for check in result["checks"]:
    print(check["rule"], check["passed"], check["detail"])
```

## JavaScript / TypeScript

```js
import { Galore } from 'galore-sdk';

const galore = new Galore();            // practice API, no key
const { agent, rules, order } = await galore.exampleRules();
const result = await galore.check(agent, rules, order);
console.log(result.decision, result.summary);
```

CLI: `npx galore-sdk check --symbol AAPL --side buy --qty 2 --price 190`.

## Fields

`rules` is the live `permissions` object of `draft_existing_permissions`, and `order` is the order of `submit_existing_order`, so the same objects work there. The request's top-level `agent` names the AI; live, it comes from the AI's sign-in.

- Rules: `connectionId` (live: from `galore_connection`), `agents` (up to 20), `instruments`, `sides`, `timeInForce`, `maxQuantity` and `maxOrderUsd` (per trade), `maxDailySubmittedUsd` and `maxOrdersPerDay` (per day), `maxSnapshotAgeMs`, `expiresAt` (Unix ms), `disclosure` (the fixed text from the example). Optional: `confirmAboveUsd` (the person confirms larger trades), `maxPositionUsd`.
- Order: `eventId` (one stable id per trade; reuse it only to retry that same trade), `connectionId`, `instrument`, `side`, `quantity`, `limitPrice`, `orderType` (`limit`), `timeInForce`, `validUntil` (ms, at most five minutes ahead).
- Optional `context`: `ordersToday`, `submittedTodayUsd`, `positionUsd`, `availableQuantity`, `recentEventIds`, and `now` to fix the clock in tests.

## Live connector steps

Add `https://connect.trygalore.com/mcp` and have the person sign in. Code without MCP calls the same tools at `POST https://connect.trygalore.com/v1/tools/<name>` with a Galore API key ([OpenAPI](https://connect.trygalore.com/connect/openapi.json)).

1. `galore_connection`: find the brokerage connection to use (the real `connectionId`).
2. `draft_existing_permissions` with `{ permissions: <rules> }`. The person approves them in their own browser.
3. `preview_existing_order` checks a trade and sends nothing. `submit_existing_order` sends one trade under the approved rules.
4. `existing_order_status`: the brokerage's status and fills. Never resend a trade whose result is uncertain; read this instead.

## Hard rules for agents

- Only the person approves rules, in their own browser. An agent cannot approve, widen or extend them.
- Never ask for passwords, brokerage keys or codes in chat.
- Never get around a stop or a refusal by changing the trade's wording or splitting it.
- Never resend a trade whose result is uncertain. Read its status; resending with the same `eventId` is held as a duplicate.
- An allowed trade is not a fill until the brokerage says so.

## Pricing

Practice API and SDKs: free. Live trade checks: Galore membership, $19 a month, Night Stop included, never a cut of trades. Business and app pricing: custom (`https://trygalore.com/contact`).

## Links

- Docs: https://trygalore.com/developers and https://trygalore.com/developers/sandbox
- Everything as Markdown: https://trygalore.com/llms-full.txt
- SDK source: https://github.com/mehek-builds/galore-sdk
