Paper trading
Same API, standard envelope
Every /api/bot/v1/* path has a /v2 twin: identical parameters and identical data, wrapped as {ok:true,data,ts} or {ok:false,error:{code,message},ts}. v1 response bodies are frozen and will not change; new work happens on v2. Swap v1 for v2 in the URL. There is also a WebSocket that OpenAPI cannot describe: wss://marginpad.io/api/bot/v2/stream?api_key=... pushes position opened/updated/closed events and mark prices, which replaces polling /positions entirely.
get/api/bot/v2/{endpoint}
Request
- Base URL: https://marginpad.io
- URL: https://marginpad.io/api/bot/v2/{endpoint}
- Auth: API key in header X-API-Key
Path parameters
endpointstring required
account | balance | positions | trades | markets | open | close | close_all | sltp | price | klines | time
Response
ok
Example response
{
"error": {
"code": "unknown_symbol"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.