Skip to main content

Authentication

There is no bearer token. Every request is signed with your Ed25519 private key. BlankFX stores only your public key, so there is no shared secret that can leak from our side.

1. Create an API key

1

Open the app

Go to Settings → API keys → Create.
2

Choose scopes

Pick the scopes your integration needs.
3

Save the private key

Your Ed25519 keypair is generated in your browser — only the public key is sent to BlankFX. The private key (PKCS8 PEM) is shown exactly once. Store it in your secrets manager.
You receive a key_id (e.g. bfx_test_ab12…). That, plus your private key, is all you need to sign.

2. Sign every request

Build the canonical string (LF-separated, no trailing newline):
string
Unix seconds, within ±30s of server time.
string
Upper-case HTTP method.
string
The path including any query string (e.g. /public/v1/fx/orders?limit=10).
string
Hex SHA-256 of the raw request body. Use sha256_hex("") for GET / no body.
Send three headers:
Freshness + replay. Each signature is single-use. Re-sending an identical signed request is rejected (replayed). Always sign retries — even idempotent ones — with a fresh timestamp.

Node example

The signed requestTarget must exactly equal the path the server receives. Against the sandbox host sign /public/v1/...; against api.blankfx.org/v1 sign /v1/.... Sign the path you send.