Source: https://hamster-bot.com/en/exchange/okx

# Trading bot for OKX

hamster-bot runs on your own computer or VPS and trades on OKX through the API. Your money stays in your exchange account, and the keys never leave your machine: they are only in the bot's settings.

[Sign up on OKX](https://www.okx.com/join/12031019) [Download the bot](https://hamster-bot.com/en/download)

### Markets

In the bot settings, set `exchange.name` and the pair as the exchange names it:

| Market | `exchange.name` | Pair example |
| --- | --- | --- |
| USDT-M futures (perpetual) | `okx` | `BTC-USDT-SWAP` |
| Coin-M futures (inverse) | `okx` | `BTC-USD-SWAP` |
| Delivery futures | `okx` | `BTC-USDT-250627` |
| Spot | `okx` | `BTC-USDT` |

On spot the bot only goes long, there is no shorting.

### API key

Create an API key on OKX with trading permission. The bot never needs to withdraw, so leave that permission off. If the exchange allows it, restrict the key to the IP of the computer or server the bot runs on.
OKX will ask you to set a passphrase for the key. Save it, because the bot needs it too.
To trade futures, switch your OKX account mode to «Spot and futures». In «Spot only» mode the bot can only trade spot.

### Strategies

All of the bot's strategies are available on OKX. Before trading real money, run your settings on historical data in the [tester](https://hamster-bot.com/en/tester).

[ZigZag, ZZ](https://hamster-bot.com/en/algo/zigzag) · [ZigZag Double, ZigZag MarketOrder](https://hamster-bot.com/en/algo/zigzag-double) · [Donchian Channel](https://hamster-bot.com/en/algo/donchianchannel) · [Channel Close Strategy](https://hamster-bot.com/en/algo/tv-ccs) · [RiskTurtle](https://hamster-bot.com/en/algo/riskturtle) · [Moving Average Crossover, Price vs MA, MACD Trend](https://hamster-bot.com/en/algo/movingaveragecrossover) · [Squeeze](https://hamster-bot.com/en/algo/squeeze) · [RSI Pullback](https://hamster-bot.com/en/algo/rsipullback) · [DoubleDragon](https://hamster-bot.com/en/algo/doubledragon) · [MRS](https://hamster-bot.com/en/algo/mrs) · [MRS2, MRS2 FAST](https://hamster-bot.com/en/algo/mrs2) · [MRS3](https://hamster-bot.com/en/algo/mrs3) · [HiDeep](https://hamster-bot.com/en/algo/hideep) · [RedFlag](https://hamster-bot.com/en/algo/redflag) · [SmartProfit](https://hamster-bot.com/en/algo/smartprofit) · [Grid](https://hamster-bot.com/en/algo/grid) · [ShadowOverlap](https://hamster-bot.com/en/algo/shadowoverlap) · [TV MAPM](https://hamster-bot.com/en/algo/tv-mapm) · [MZ](https://hamster-bot.com/en/algo/mz) · [TradingView Webhook](https://hamster-bot.com/en/algo/tv) · [Volume Market](https://hamster-bot.com/en/algo/volumemarket) · [Long/Short-bot](https://hamster-bot.com/en/algo/tv-lsb) · [Close Position Delete Orders](https://hamster-bot.com/en/algo/closepositiondeleteorders)

### Videos

[OKX support in hamster-bot](https://youtu.be/DrXzbYX25g8) [First launch of the trading bot](https://youtu.be/hHa0eE0yTw4) [Trading on TradingView alerts](https://youtu.be/cCvdnAOJl7k)

[All videos →](https://hamster-bot.com/en/video)

### Exchange sign-up

If you don't have a OKX account yet, please sign up with my [referral link](https://www.okx.com/join/12031019). It helps me keep working on the bot.

---

[Other exchanges](https://hamster-bot.com/en/exchange): [Bybit](https://hamster-bot.com/en/exchange/bybit) · [Binance](https://hamster-bot.com/en/exchange/binance) · [Bitget](https://hamster-bot.com/en/exchange/bitget) · [BingX](https://hamster-bot.com/en/exchange/bingx) · [BTSE](https://hamster-bot.com/en/exchange/btse) · [Hyperliquid](https://hamster-bot.com/en/exchange/hyperliquid)

[Compared with cloud bots](https://hamster-bot.com/en/alternative): [3Commas](https://hamster-bot.com/en/alternative/3commas) · [Bitsgap](https://hamster-bot.com/en/alternative/bitsgap) · [Cryptohopper](https://hamster-bot.com/en/alternative/cryptohopper)
