Pipsend

TypeScript bots, inside the platform.

Write, compile and run automated strategies in Pipsend, in an isolated sandbox with the permissions each bot declares.

alpha-trend.ts

defineBot({

name: "Alpha Trend",

permissions: ["trade", "read-market"],

// the bot's lifecycle hooks

})

Alpha TrendRunning

From the editor to the orders.

  1. 1

    Built-in editor

    You write the bot in a Monaco editor, with types.

  2. 2

    Local compilation

    esbuild-wasm turns TypeScript into JavaScript inside the browser.

  3. 3

    Isolated sandbox

    The bot runs in a Web Worker, separate from the rest of the app.

  4. 4

    Orders and data

    It receives ticks and candles and sends trading requests through a controlled bridge.

Each bot declares what it needs.

It only gets the permissions it asked for. Toggle them to see.

2/4

permissions granted

A bot, in a few lines.

You only write the body: the platform wraps it in defineBot. Every hook is optional.

The full documentationHooks, the context API, types, permissions and complete examples, on one page with a contents list and copyable code.
ts
onInit(ctx) {
  ctx.storage.set('symbol', 'EURUSD')
  ctx.log.info('Bot started')
},

async onCandleClose(ctx, candle) {
  const symbol = ctx.storage.get('symbol') as string
  const candles = await ctx.market.getCandles(symbol, '15m', 60)
  if (candles.length < 20) return
  const sma = (n: number) => candles.slice(-n).reduce((a, c) => a + c.close, 0) / n

  if (sma(10) > sma(20)) {
    try {
      await ctx.order.send({ symbol, type: 'market', side: 'buy', volume: 0.1, tag: 'demo:' + candle.time })
    } catch (err) {
      ctx.log.error('Order failed: ' + err)
    }
  }
},

onDispose(ctx) {
  ctx.log.info('Bot stopped')
},
AI skill

Let your AI write the bots for you.

A skill with the Bot SDK rules, the context API and real examples. Your assistant reads it and generates bots the platform accepts on the first try.

  1. 1Download the skill or copy the install command.
  2. 2Save it in your assistant's skills folder (in Claude Code: ~/.claude/skills).
  3. 3Ask it, for example: write a bot that buys on a two moving average cross with a stop loss.
Install in Claude Code
mkdir -p ~/.claude/skills/pipsend-bots/references
curl -fsSL https://pipsend.com/skills/pipsend-bots/SKILL.md -o ~/.claude/skills/pipsend-bots/SKILL.md
curl -fsSL https://pipsend.com/skills/pipsend-bots/references/api.md -o ~/.claude/skills/pipsend-bots/references/api.md

It works as a skill in Claude Code. With other assistants, paste the contents of SKILL.md into the conversation or the project instructions.

A small API, for the whole bot.

ctx.market

Prices, ticks and candles.

ctx.order

Send and manage orders.

ctx.portfolio

Positions and account state.

ctx.storage

The bot's own data.

ctx.log

A log of what it does.

From code to the trader's account.

  1. 1

    The brokerage builds the bot

    It is written and published from the platform. Source code is capped at 512 KB.

  2. 2

    Clients receive compiled code

    Their traders install the bot without access to the source.

  3. 3

    It runs isolated in the app

    Each bot lives in its own Web Worker with only the permissions it declared.

  4. 4

    Its orders go through the same engine

    Margin, risk and rules apply just like on any other trade.

Launch your platform in weeks, not months.

Book a demo and connect your operation with Pipsend, with nothing to build from scratch.