OrbiProxy API

Integration guide

Overview

OrbiProxy OpenAPI uses HMAC-SHA256 for request authentication. Base URL: https://api.orbiproxy.com/v1/open

Obtain AK/SK

Sign in to the console → API page to generate a key pair:

  • Access Key (AK)
  • Secret Key (SK, shown only once at creation)

Keep SK confidential—never expose it in frontends, public repos, or logs.

Request headers

Every OpenAPI request must include these auth headers:

HeaderTypeRequiredDescriptionExample
X-Access-KeystringYesAccess Keyak_xxxxxxxxxxxx
X-TimestampstringYesUnix timestamp in seconds or milliseconds1747555200
X-SignstringYesHMAC-SHA256 signature as lowercase hex6069dfb4…
Content-TypestringRequired for POSTRequest body typeapplication/json

X-Timestamp must be within 5 minutes of server time.

For local debugging you may temporarily send X-Access-Key + X-Secret-Key (plaintext SK—not for production).

Signing algorithm

Concatenate fields with no separators:

signString = UPPER(METHOD) + path + X-Timestamp + rawBody
X-Sign = lowerHex( HMAC-SHA256( SK, signString ) )

# path must include the query string when present:
#   GET /v1/open/proxies?type=isp  →  path = "/v1/open/proxies?type=isp"
#   GET /v1/open/balance          →  path = "/v1/open/balance"
FieldRule
METHODUppercase HTTP method, e.g. GET / POST
pathRequest path including query when present, e.g. /v1/open/products?type=isp
X-TimestampMust match the header value exactly
rawBodyPOST: actual JSON string; GET: empty string

Signing example

Query balance:

METHOD = GET
path = /v1/open/balance
X-Timestamp = 1747555200
rawBody = (empty)

signString = GET/v1/open/balance1747555200
X-Sign = HMAC-SHA256(SK, signString)

Call examples

curl

BASE="http://127.0.0.1:8080"
AK="ak_xxxxxxxxxxxx"
SK="sk_xxxxxxxxxxxx"
TS=$(date +%s)
PATH_Q="/v1/open/balance"
PAYLOAD="GET${PATH_Q}${TS}"
SIGN=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SK" | awk '{print $2}')

curl -s "$BASE$PATH_Q" \
  -H "X-Access-Key: $AK" \
  -H "X-Timestamp: $TS" \
  -H "X-Sign: $SIGN"

Node.js

import crypto from 'node:crypto'

function sign(sk, method, path, ts, body = '') {
  const payload = method.toUpperCase() + path + ts + body
  return crypto.createHmac('sha256', sk).update(payload).digest('hex')
}

const ts = String(Math.floor(Date.now() / 1000))
const path = '/v1/open/balance'
const headers = {
  'X-Access-Key': process.env.AK,
  'X-Timestamp': ts,
  'X-Sign': sign(process.env.SK, 'GET', path, ts),
}
const res = await fetch('http://127.0.0.1:8080' + path, { headers })
console.log(await res.json())

FAQ

How do I sign a POST with an empty body?

Use an empty rawBody; the sign string ends with the timestamp.

Is X-Sign case-sensitive?

Use lowercase hex consistently.

Why does verification fail with the same parameters?

Check METHOD casing, that path includes the raw query string when present, timestamp units, and that the JSON sent matches the sign string (avoid re-serialization).