Skip to main content
This recipe reads your account with GET /api/v1/account and prints which environment answered, the account status and whether your key may place orders. Run it whenever you set up a new key or server.

Prerequisites

  • MART_API_KEY: your API key, any scope.
  • MART_API_BASE: https://sandbox.mart.ps while you build, https://mart.ps when you go live.
One runtime: cURL 7.84 or later with jq; Node 22.18 or later, which runs the .ts file as it is; Python 3.9 or later with httpx; PHP 7.4 or later with its curl extension; Go 1.22 or later; or Java 17 or later with Jackson (jackson-databind). Each file reads its variables from the environment and sets a timeout on every call. Run it on your own server: a browser or an app never holds the key.

Run the recipe

Verify the result

  • environment is the X-Mart-Environment header. If it is not the one you meant, fix MART_API_BASE first.
  • account status is active, paused (reads work, no new orders) or closed.
  • orders enabled is true when your key may create orders.

Troubleshooting

Every other code is in the error catalog.