# BitMEX Connect BitMEX to rotki to import your margin trading history, deposits, withdrawals, and balances. ## Features - Margin trades imported as margin position records with realised P/L and fees. - Deposits and withdrawals imported as asset movements. - Balance reconciliation: BitMEX returns balances in satoshi-style integer units; rotki normalises them to real amounts using the asset's decimals. ## Setup 1. In BitMEX, open Account → API Keys → Create API Key. 2. Leave only read access; do not grant the "Order" or "Withdraw" permissions. 3. In rotki, open API Keys → Exchanges → Add BitMEX and paste the key and secret. ## FAQ ### Where are my BitMEX API keys sent? rotki is a local application: your BitMEX API key is stored on your computer and used to sign each request, which goes directly from your machine to BitMEX's API. No rotki-operated server ever sees the key or the request. ### Can rotki place trades or withdraw on BitMEX? No. rotki only requests read access and never sends order or withdrawal calls.