Authentication reference
Exact bytes of Time Seventeen order frames and signed account reads, nonce lanes, order-id namespaces and official test vectors.
Order frame
frame = account u32 LE | len u16 LE | nonce u64 LE | body[len] | signature[64]
message = "T17-ORDER/2" | account u32 LE | nonce u64 LE | body
signature = Ed25519(private key, message)bodyis one order command. The command’s ownaccountfield must equal the frame’s account.- Several frames can be concatenated in one
POST /v2/ordersbody (up to 64 KiB); each gets its own result. nonce= lane (top 8 bits) ‖ counter (low 56 bits). Each (account, lane) accepts a counter once, within 1,024 below the newest seen.
Signed account read
message = "T17-FAST-ACCOUNT/1|" + account + "|" + unix_ms (ASCII, decimal)
headers: x-t17-ts: <unix_ms>
x-t17-signature: <hex of the 64-byte signature>Valid for 30 seconds around the server clock. The same signature authenticates the WebSocket auth operation and the site’s account-history endpoints.
Test vectors
Implementations must reproduce these bytes. Seed 0707…07 (32 bytes of 0x07):
{
"account_query": {
"account": 7,
"signature": "deb59adafbd09240d98164ad85b8cd72ec4615b23f438cf7682b1cb51a93db515e26b5c139c509f75510d88c4a3d873fd63e289c6acc9d450415e69e906fb907",
"unix_ms": 1794900000000
},
"commands": [
{
"hex": "0a01000000070000000700000003000000000000000000000000000000000000000000002a0000000a0000000000000000000000000000000000000000000000",
"name": "new_yes_buy_gtc"
},
{
"hex": "0a630000000700000007000000030000000300000000000000000001000000000000000037000000e80300000000000000000000000000000000000000000000",
"name": "new_no_sell_ioc"
},
{
"hex": "0a640000000700000007000000030000000400000000000000000002000000000000000001000000050000000000000000000000000000000000000000000000",
"name": "new_post_only_fok"
},
{
"hex": "0b070000000100000007000000",
"name": "cancel"
},
{
"hex": "0c0700000001000000070000002b0000000900000000000000",
"name": "amend"
},
{
"hex": "0d070000000400000000000000",
"name": "cancel_all_market"
},
{
"hex": "0d070000000000000000000000",
"name": "cancel_all"
},
{
"hex": "1507000000050000000700000090d0030000000000",
"name": "withdrawal"
}
],
"frame": {
"account": 7,
"command": "new_yes_buy_gtc",
"hex": "0700000040000048e8b8736006010a01000000070000000700000003000000000000000000000000000000000000000000002a0000000a0000000000000000000000000000000000000000000000c2ba12a9d690a0492b14afd1aa5525eea200ee798565f7939fb6057e89ed721cdaa573e764fd70f19994957e9b2ed2ad0675424795d813651de7d6e73e61590c",
"nonce": "73852494037927936"
},
"public_key": "ea4a6c63e29c520abef5507b132ec5f9954776aebebe7b92421eea691446d22c",
"seed": "0707070707070707070707070707070707070707070707070707070707070707"
}commandsare command bodies (hex);framesignsnew_yes_buy_gtcfor account 7 with the given nonce.account_queryis the signature ofT17-FAST-ACCOUNT/1|7|1794900000000.- The exchange’s own server and browser code are tested against this file, so any format change breaks those tests too.
Refusals
A frame that fails authentication is answered {"Refused": reason} and never reaches the book:
| Reason | Cause |
|---|---|
UnknownKey | No key registered for the account, or it was replaced |
BadSignature | Signature does not verify |
Replay | Nonce already used in this lane, or more than 1,024 below the newest |
WrongAccount | Command account differs from the frame account |
IdNamespace | Order or withdrawal id not in account × 2^32 |
Malformed | Frame or body cannot be decoded |