{"info":{"name":"AnonChange partner API","description":"https://anonchange.com/docs. Set the apiKey and apiSecret collection variables; every request is signed by the collection's pre-request script.","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"variable":[{"key":"apiKey","value":""},{"key":"apiSecret","value":""}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["const body = pm.request.body && pm.request.body.raw ? pm.variables.replaceIn(pm.request.body.raw) : \"\";","const timestamp = String(Math.floor(Date.now() / 1000));","const path = \"/\" + pm.request.url.path.join(\"/\");","const nonce = CryptoJS.lib.WordArray.random(16).toString();","const idempotencyKey = pm.variables.replaceIn(pm.request.headers.get(\"Idempotency-Key\") || \"\");","const signed = timestamp + \"\\n\" + nonce + \"\\nPOST\\n\" + path + \"\\n\" + idempotencyKey + \"\\n\" + CryptoJS.SHA256(body).toString();","pm.request.body.update(body);","pm.request.headers.upsert({ key: \"X-API-KEY\", value: pm.variables.get(\"apiKey\") });","pm.request.headers.upsert({ key: \"X-API-TIMESTAMP\", value: timestamp });","pm.request.headers.upsert({ key: \"X-API-NONCE\", value: nonce });","pm.request.headers.upsert({ key: \"X-API-SIGN\", value: CryptoJS.HmacSHA256(signed, pm.variables.get(\"apiSecret\")).toString() });"]}}],"item":[{"name":"currencies","request":{"method":"POST","description":"All coins with their limits","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://anonchange.com/api/partner/v1/currencies","protocol":"https","host":["anonchange","com"],"path":["api","partner","v1","currencies"]}}},{"name":"pairs","request":{"method":"POST","description":"Every pair of enabled coins","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://anonchange.com/api/partner/v1/pairs","protocol":"https","host":["anonchange","com"],"path":["api","partner","v1","pairs"]}}},{"name":"price","request":{"method":"POST","description":"A quote for a pair","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"from\": \"BTC\",\n  \"to\": \"XMR\",\n  \"rateType\": \"fixed\",\n  \"amount\": \"0.01\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://anonchange.com/api/partner/v1/price","protocol":"https","host":["anonchange","com"],"path":["api","partner","v1","price"]}}},{"name":"create","request":{"method":"POST","description":"Create an order","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"from\": \"BTC\",\n  \"to\": \"XMR\",\n  \"rateType\": \"fixed\",\n  \"amount\": \"0.01\",\n  \"payoutAddress\": \"<customer's XMR address>\",\n  \"refundAddress\": \"<customer's BTC address>\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://anonchange.com/api/partner/v1/create","protocol":"https","host":["anonchange","com"],"path":["api","partner","v1","create"]}}},{"name":"status","request":{"method":"POST","description":"One of your orders","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"3f6c1a52-8d1e-4b7a-9c35-2f0e6b9d4a17\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://anonchange.com/api/partner/v1/status","protocol":"https","host":["anonchange","com"],"path":["api","partner","v1","status"]}}},{"name":"orders","request":{"method":"POST","description":"Your orders, newest first","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"limit\": 2\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://anonchange.com/api/partner/v1/orders","protocol":"https","host":["anonchange","com"],"path":["api","partner","v1","orders"]}}},{"name":"continue","request":{"method":"POST","description":"Continue at the market rate after a price move","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"3f6c1a52-8d1e-4b7a-9c35-2f0e6b9d4a17\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://anonchange.com/api/partner/v1/continue","protocol":"https","host":["anonchange","com"],"path":["api","partner","v1","continue"]}}},{"name":"refund","request":{"method":"POST","description":"Refund after a price move","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"3f6c1a52-8d1e-4b7a-9c35-2f0e6b9d4a17\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://anonchange.com/api/partner/v1/refund","protocol":"https","host":["anonchange","com"],"path":["api","partner","v1","refund"]}}}]}