SIGNED Endpoint Example

This step-by-step guide demonstrates how to send a valid signed payload from the Linux command line using echo, openssl, and curl.


🔐 Keys

Key
Value

apiKey

vmPUZE6mv9SD5V5e14y7Ju91duEh8A

secretKey

902ae3cb34ecee2779aa4d3e1d226686


📦 Request Parameters

Parameter
Value

symbol

BTCUSDT

side

BUY

type

LIMIT

volume

1

price

9300


🧾 Request Body

jsonCopyEdit{"symbol":"BTCUSDT","price":"9300","volume":"1","side":"BUY","type":"LIMIT"}

🔐 Signature Construction

Using:

sqlCopyEdittimestamp + method + requestPath + body

Example values:

  • timestamp: 1588591856950

  • method: POST

  • requestPath: /sapi/v1/order/test

  • body: {"symbol":"BTCUSDT","price":"9300","volume":"1","side":"BUY","type":"LIMIT"}

Signature Command (Linux):

bashCopyEditecho -n "1588591856950POST/sapi/v1/order/test{\"symbol\":\"BTCUSDT\",\"price\":\"9300\",\"volume\":\"1\",\"side\":\"BUY\",\"type\":\"LIMIT\"}" \
| openssl dgst -sha256 -hmac "902ae3cb34ecee2779aa4d3e1d226686"

Output:

luaCopyEdit(stdin)= c50d0a74bb9427a9a03933d0eded03af9bf50115dc5b706882a4fcf07a26b761

📡 cURL Command

bashCopyEditcurl -X POST https://openapi.coinlocally.com/sapi/v1/order/test \
  -H "Content-Type: application/json" \
  -H "X-CH-APIKEY: vmPUZE6mv9SD5V5e14y7Ju91duEh8A" \
  -H "X-CH-SIGN: c50d0a74bb9427a9a03933d0eded03af9bf50115dc5b706882a4fcf07a26b761" \
  -H "X-CH-TS: 1588591856950" \
  -d '{"symbol":"BTCUSDT","price":"9300","volume":"1","side":"BUY","type":"LIMIT"}'

Last updated