UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 20.8 kB
{"openapi":"3.0.0","info":{"description":"Professional Cloud Trading Platform for Digital Assets","title":"Yunbi","version":"v2","x-apisguru-categories":["financial"],"x-logo":{"url":"https://pbs.twimg.com/profile_images/725256993741660160/LRhoyEy_.jpg"},"x-origin":[{"converter":{"url":"https://github.com/lucybot/api-spec-converter","version":"2.0.1"},"format":"swagger","url":"https://yunbi.com/api/v2/doc/swagger","version":"1.2"}],"x-providerName":"yunbi.com","x-tags":["bitcoin","digital currency"]},"tags":[{"name":"addresses"},{"name":"deposit"},{"name":"deposit_address"},{"name":"deposits"},{"name":"depth"},{"name":"k"},{"name":"k_with_pending_trades"},{"name":"markets"},{"name":"members"},{"name":"order"},{"name":"order_book"},{"name":"orders"},{"name":"partners"},{"name":"tickers"},{"name":"timestamp"},{"name":"trades"}],"paths":{"/v2/addresses/{address}.json":{"get":{"operationId":"GET--version-addresses--address---format-","parameters":[{"in":"path","name":"address","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Check Deposit Address","tags":["addresses"]}},"/v2/deposit.json":{"get":{"operationId":"GET--version-deposit---format-","parameters":[{"description":"Access key.","in":"query","name":"access_key","required":true,"schema":{"type":"string"}},{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","in":"query","name":"tonce","required":true,"schema":{"type":"integer"}},{"description":"The signature of your request payload, generated using your secret key.","in":"query","name":"signature","required":true,"schema":{"type":"string"}},{"in":"query","name":"txid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get details of specific deposit.","tags":["deposit"]}},"/v2/deposit_address.json":{"get":{"operationId":"GET--version-deposit_address---format-","parameters":[{"description":"Access key.","in":"query","name":"access_key","required":true,"schema":{"type":"string"}},{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","in":"query","name":"tonce","required":true,"schema":{"type":"integer"}},{"description":"The signature of your request payload, generated using your secret key.","in":"query","name":"signature","required":true,"schema":{"type":"string"}},{"description":"The account to which you want to deposit. Available values: cny, btc, eth, pls, note, bts, bitcny, bitusd, bitbtc, yun, nxt, ltc, doge, sc, dgd, dcs, dao, etc, amp, 1st, rep, ans, zec, zmc, gnt, gxs, qtum, eos, snt, bcc, omg, lun, pay, ven","in":"query","name":"currency","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Where to deposit. The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case.","tags":["deposit_address"]}},"/v2/deposits.json":{"get":{"operationId":"GET--version-deposits---format-","parameters":[{"description":"Access key.","in":"query","name":"access_key","required":true,"schema":{"type":"string"}},{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","in":"query","name":"tonce","required":true,"schema":{"type":"integer"}},{"description":"The signature of your request payload, generated using your secret key.","in":"query","name":"signature","required":true,"schema":{"type":"string"}},{"description":"Currency value contains cny, btc, eth, pls, note, bts, bitcny, bitusd, bitbtc, yun, nxt, ltc, doge, sc, dgd, dcs, dao, etc, amp, 1st, rep, ans, zec, zmc, gnt, gxs, qtum, eos, snt, bcc, omg, lun, pay, ven","in":"query","name":"currency","required":false,"schema":{"type":"string"}},{"description":"Set result limit.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"State value contains submitting, cancelled, submitted, rejected, accepted, checked, warning","in":"query","name":"state","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get your deposits history.","tags":["deposits"]}},"/v2/depth.json":{"get":{"operationId":"GET--version-depth---format-","parameters":[{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","in":"query","name":"market","required":true,"schema":{"type":"string"}},{"description":"Limit the number of returned price levels. Default to 300.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get depth or specified market. Both asks and bids are sorted from highest price to lowest.","tags":["depth"]}},"/v2/k.json":{"get":{"operationId":"GET--version-k---format-","parameters":[{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","in":"query","name":"market","required":true,"schema":{"type":"string"}},{"description":"Limit the number of returned data points, default to 30.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Time period of K line, default to 1. You can choose between 1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080","in":"query","name":"period","required":false,"schema":{"type":"integer"}},{"description":"An integer represents the seconds elapsed since Unix epoch. If set, only k-line data after that time will be returned.","in":"query","name":"timestamp","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get OHLC(k line) of specific market.","tags":["k"]}},"/v2/k_with_pending_trades.json":{"get":{"operationId":"GET--version-k_with_pending_trades---format-","parameters":[{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","in":"query","name":"market","required":true,"schema":{"type":"string"}},{"description":"The trade id of the first trade you received.","in":"query","name":"trade_id","required":true,"schema":{"type":"integer"}},{"description":"Limit the number of returned data points, default to 30.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Time period of K line, default to 1. You can choose between 1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080","in":"query","name":"period","required":false,"schema":{"type":"integer"}},{"description":"An integer represents the seconds elapsed since Unix epoch. If set, only k-line data after that time will be returned.","in":"query","name":"timestamp","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator.","tags":["k_with_pending_trades"]}},"/v2/markets.json":{"get":{"operationId":"GET--version-markets---format-","responses":{"200":{"description":"No response was specified"}},"summary":"Get all available markets.","tags":["markets"]}},"/v2/members/me.json":{"get":{"operationId":"GET--version-members-me---format-","parameters":[{"description":"Access key.","in":"query","name":"access_key","required":true,"schema":{"type":"string"}},{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","in":"query","name":"tonce","required":true,"schema":{"type":"integer"}},{"description":"The signature of your request payload, generated using your secret key.","in":"query","name":"signature","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get your profile and accounts info.","tags":["members"]}},"/v2/order.json":{"get":{"operationId":"GET--version-order---format-","parameters":[{"description":"Access key.","in":"query","name":"access_key","required":true,"schema":{"type":"string"}},{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","in":"query","name":"tonce","required":true,"schema":{"type":"integer"}},{"description":"The signature of your request payload, generated using your secret key.","in":"query","name":"signature","required":true,"schema":{"type":"string"}},{"description":"Unique order id.","in":"query","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get information of specified order.","tags":["order"]}},"/v2/order/delete.json":{"post":{"operationId":"POST--version-order-delete---format-","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"access_key":{"description":"Access key.","type":"string"},"tonce":{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","type":"integer"},"signature":{"description":"The signature of your request payload, generated using your secret key.","type":"string"},"id":{"description":"Unique order id.","type":"integer"}},"required":["access_key","tonce","signature","id"]}}}},"responses":{"200":{"description":"No response was specified"}},"summary":"Cancel an order.","tags":["order"]}},"/v2/order_book.json":{"get":{"operationId":"GET--version-order_book---format-","parameters":[{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","in":"query","name":"market","required":true,"schema":{"type":"string"}},{"description":"Limit the number of returned sell orders. Default to 20.","in":"query","name":"asks_limit","required":false,"schema":{"type":"integer"}},{"description":"Limit the number of returned buy orders. Default to 20.","in":"query","name":"bids_limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get the order book of specified market.","tags":["order_book"]}},"/v2/orders.json":{"get":{"operationId":"GET--version-orders---format-","parameters":[{"description":"Access key.","in":"query","name":"access_key","required":true,"schema":{"type":"string"}},{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","in":"query","name":"tonce","required":true,"schema":{"type":"integer"}},{"description":"The signature of your request payload, generated using your secret key.","in":"query","name":"signature","required":true,"schema":{"type":"string"}},{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","in":"query","name":"market","required":true,"schema":{"type":"string"}},{"description":"Filter order by state. One of 'wait', 'done', or 'cancel'. An order in 'wait' is an active order, waiting fullfillment; a 'done' order is an order fullfilled; 'cancel' means the order has been cancelled. Default to 'wait'.","in":"query","name":"state","required":false,"schema":{"type":"string"}},{"description":"Limit the number of returned orders, default to 100.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Specify the page of paginated results.","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"If set, returned orders will be sorted in specific order. One of 'asc' or 'desc', default to 'asc'.","in":"query","name":"order_by","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get your orders, results is paginated.","tags":["orders"]},"post":{"operationId":"POST--version-orders---format-","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"access_key":{"description":"Access key.","type":"string"},"tonce":{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","type":"integer"},"signature":{"description":"The signature of your request payload, generated using your secret key.","type":"string"},"market":{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","type":"string"},"side":{"description":"Either 'sell' or 'buy'.","type":"string"},"volume":{"description":"The amount user want to sell/buy. An order could be partially executed, e.g. an order sell 5 btc can be matched with a buy 3 btc order, left 2 btc to be sold; in this case the order's volume would be '5.0', its remaining_volume would be '2.0', its executed volume is '3.0'.","type":"string"},"price":{"description":"Price for each unit. e.g. If you want to sell/buy 1 btc at 3000 CNY, the price is '3000.0'","type":"string"},"ord_type":{"description":"Type of order, either 'limit' or 'market'.","type":"string"}},"required":["access_key","tonce","signature","market","side","volume"]}}}},"responses":{"200":{"description":"No response was specified"}},"summary":"Create a Sell/Buy order.","tags":["orders"]}},"/v2/orders/clear.json":{"post":{"operationId":"POST--version-orders-clear---format-","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"access_key":{"description":"Access key.","type":"string"},"tonce":{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","type":"integer"},"signature":{"description":"The signature of your request payload, generated using your secret key.","type":"string"},"side":{"description":"If present, only sell orders (asks) or buy orders (bids) will be canncelled.","type":"string"}},"required":["access_key","tonce","signature"]}}}},"responses":{"200":{"description":"No response was specified"}},"summary":"Cancel all my orders.","tags":["orders"]}},"/v2/orders/multi.json":{"post":{"operationId":"POST--version-orders-multi---format-","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"access_key":{"description":"Access key.","type":"string"},"tonce":{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","type":"integer"},"signature":{"description":"The signature of your request payload, generated using your secret key.","type":"string"},"market":{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","type":"string"},"orders":{"type":"array","items":{"type":"string"}},"orders[side]":{"description":"Either 'sell' or 'buy'.","type":"string"},"orders[volume]":{"description":"The amount user want to sell/buy. An order could be partially executed, e.g. an order sell 5 btc can be matched with a buy 3 btc order, left 2 btc to be sold; in this case the order's volume would be '5.0', its remaining_volume would be '2.0', its executed volume is '3.0'.","type":"string"},"orders[price]":{"description":"Price for each unit. e.g. If you want to sell/buy 1 btc at 3000 CNY, the price is '3000.0'","type":"string"},"orders[ord_type]":{"description":"Type of order, either 'limit' or 'market'.","type":"string"}},"required":["access_key","tonce","signature","market","orders","orders[side]","orders[volume]"]}}}},"responses":{"200":{"description":"No response was specified"}},"summary":"Create multiple sell/buy orders.","tags":["orders"]}},"/v2/partners/orders/{id}/trades.json":{"get":{"operationId":"GET--version-partners-orders--id-trades---format-","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"access_key_hash","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"tags":["partners"]}},"/v2/tickers.json":{"get":{"operationId":"GET--version-tickers---format-","responses":{"200":{"description":"No response was specified"}},"summary":"Get ticker of all markets.","tags":["tickers"]}},"/v2/tickers/{market}.json":{"get":{"operationId":"GET--version-tickers--market---format-","parameters":[{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","in":"path","name":"market","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get ticker of specific market.","tags":["tickers"]}},"/v2/timestamp.json":{"get":{"operationId":"GET--version-timestamp---format-","responses":{"200":{"description":"No response was specified"}},"summary":"Get server current time, in seconds since Unix epoch.","tags":["timestamp"]}},"/v2/trades.json":{"get":{"operationId":"GET--version-trades---format-","parameters":[{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","in":"query","name":"market","required":true,"schema":{"type":"string"}},{"description":"Limit the number of returned trades. Default to 50.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"An integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.","in":"query","name":"timestamp","required":false,"schema":{"type":"integer"}},{"description":"Trade id. If set, only trades created after the trade will be returned.","in":"query","name":"from","required":false,"schema":{"type":"integer"}},{"description":"Trade id. If set, only trades created before the trade will be returned.","in":"query","name":"to","required":false,"schema":{"type":"integer"}},{"description":"If set, returned trades will be sorted in specific order. One of 'asc' or 'desc', default to 'desc'.","in":"query","name":"order_by","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.","tags":["trades"]}},"/v2/trades/my.json":{"get":{"operationId":"GET--version-trades-my---format-","parameters":[{"description":"Access key.","in":"query","name":"access_key","required":true,"schema":{"type":"string"}},{"description":"Tonce is an integer represents the milliseconds elapsed since Unix epoch.","in":"query","name":"tonce","required":true,"schema":{"type":"integer"}},{"description":"The signature of your request payload, generated using your secret key.","in":"query","name":"signature","required":true,"schema":{"type":"string"}},{"description":"Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btccny'. All available markets can be found at /api/v2/markets.","in":"query","name":"market","required":true,"schema":{"type":"string"}},{"description":"Limit the number of returned trades. Default to 50.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"An integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.","in":"query","name":"timestamp","required":false,"schema":{"type":"integer"}},{"description":"Trade id. If set, only trades created after the trade will be returned.","in":"query","name":"from","required":false,"schema":{"type":"integer"}},{"description":"Trade id. If set, only trades created before the trade will be returned.","in":"query","name":"to","required":false,"schema":{"type":"integer"}},{"description":"If set, returned trades will be sorted in specific order. One of 'asc' or 'desc', default to 'desc'.","in":"query","name":"order_by","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response was specified"}},"summary":"Get your executed trades. Trades are sorted in reverse creation order.","tags":["trades"]}}},"servers":[{"url":"https://yunbi.com/api"}]}