{"swagger":"2.0","info":{"description":"","version":"v1.0","title":"1x1.digital","termsOfService":"","contact":{"email":"contact@1x1.digital"}},"host":"www.1x1.digital","basePath":"/","tags":[{"name":"ticker","description":"Prices"},{"name":"trade","description":"Buy and sell operations"}],"schemes":["https"],"paths":{"/ticker/{from}/{to}":{"get":{"tags":["ticker"],"summary":"Get pair price","description":"Currencies: XBR, BTC and ETH. Other values will generated exceptions","operationId":"getOrderById","produces":["application/json"],"parameters":[{"name":"from","in":"path","description":"Currency symbol to sell","required":true,"type":"string"},{"name":"to","in":"path","description":"Currency symbol to buy","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Ticker"}},"400":{"description":"Invalid currency symbol or pair"}}}},"/trade":{"post":{"tags":["trade"],"summary":"Create trade operation","description":"","operationId":"","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"","required":true,"schema":{"$ref":"#/definitions/TradeForm"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Trade"}}}}},"/trade/{uid}":{"get":{"tags":["trade"],"summary":"Get trade operation","description":"","operationId":"","produces":["application/json"],"parameters":[{"name":"uid","in":"path","description":"Trade UID","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Trade"}}}}}},"definitions":{"Currency":{"type":"object","properties":{"symbol":{"type":"string","example":"XBR"},"name":{"type":"string","example":"Xreal"}}},"Ticker":{"type":"object","properties":{"pair":{"type":"string","example":"BTC_XBR"},"rate":{"type":"number","format":"double","example":68585.85155798047},"inverse":{"type":"number","format":"double","example":1.4580266589745E-5},"timestamp":{"type":"number","example":1513613045000}}},"TradeForm":{"type":"object","properties":{"input":{"type":"string","example":"BTC"},"output":{"type":"string","example":"XBR"},"withdrawalAddress":{"type":"string"}}},"TradeStatus":{"type":"object","properties":{"alias":{"type":"string","enum":["DEPOSIT_PENDING","DEPOSIT_CONFIRMATION_PENDING","WITHDRAWAL_PENDING","WITHDRAWAL_CONFIRMATION_PENDING","FINISHED","DEPOSIT_EXPIRED","REFUNDED"]}}},"Trade":{"type":"object","properties":{"uid":{"type":"string","example":"d86e0029-4bf8-4b76-b3c4-bfd297bf7749"},"status":{"$ref":"#/definitions/TradeStatus"},"input":{"$ref":"#/definitions/Currency"},"depositAddress":{"type":"string","example":"1P9gc7CWFGmGPtMZ8Xy5RofkYBkbHwiexQ"},"depositAmount":{"type":"number","format":"double","example":null},"depositTxHash":{"type":"string","example":null},"depositExpiration":{"type":"number","example":1513613045000},"output":{"$ref":"#/definitions/Currency"},"withdrawalAddress":{"type":"string","example":"0x65e8d31e206c1955599b8fd3f16ade5b79609d8c"},"withdrawalAmount":{"type":"number","format":"double","example":null},"withdrawalTxHash":{"type":"string","example":null}}}}}