Automated Trading Examples

Simplest trade possible

In this example we'll just execute a basic market order. As usual, the example assumes we are trading on BitMEX on the XBTUSD pair. Other exchanges / symbols will work the same though.

myApiKeys(XBTUSD) {
    # Buy 100 contracts NOW
    market(side=buy, amount=100);

How about if we want to spend a percentage of our balance, instead of a fixed 100 contracts. We can do the following (notice the amount).

myApiKeys(XBTUSD) {
    # Buy NOW, using 10% of my balance
    market(side=buy, amount=10%);

Learn more about the commands used here...

Some images from Unsplash


Your TradingView alerts, with charts, PM'd to you.

Get all your alerts from TradingView, sent to Telegram, Discord, Slack, Email or webhooks, with a chart snapshot attached.

Capture Charts

See a high quality chart with every alert, captured at the moment the alert was triggered. See exactly what the market was doing and make informed decisions.

Automate Trading

Trigger orders on popular cryptocurrency exchanges and trade 24/7. Access powerful algorithmic orders to maximise your profits.


Connect your alerts to Telegram (channels, groups and private chats), Discord, Slack, email or send push notifications to other services with webhooks.

Easy To Setup

Nothing to install and no browser extensions. Captures alerts 24/7, even with your computer switched off. Be up and running in seconds.