Advertisement
OvidiuS

Bitrex

Jul 26th, 2017
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.34 KB | None | 0 0
  1. using Bittrex.Models;
  2. using Refit;
  3. using System.Collections.Generic;
  4. using System.Threading.Tasks;
  5.  
  6. namespace Bittrex.Api
  7. {
  8.     public interface IBittrexApi
  9.     {
  10.         [Get("/public/getmarkets")]
  11.         Task<IRespone<IReadOnlyCollection<Market>>> GetMarkets();
  12.  
  13.         [Get("/public/getcurrencies")]
  14.         Task<IRespone<IReadOnlyCollection<Currency>>> GetCurrencies();
  15.  
  16.         [Get("/public/getticker")]
  17.         Task<IRespone<MarketTickValues>> GetTicker([AliasAs("market")] string marketName);
  18.  
  19.         [Get("/public/getmarketsummaries")]
  20.         Task<IRespone<IReadOnlyCollection<MarketSummary>>> GetMarketSummaries();
  21.  
  22.         [Get("/public/getmarketsummary")]
  23.         Task<IRespone<IReadOnlyCollection<MarketSummary>>> GetMarketSummary([AliasAs("market")] string marketName);
  24.  
  25.         // TODO - GetOrderBook
  26.  
  27.         [Get("/public/getmarkethistory")]
  28.         Task<IRespone<IReadOnlyCollection<MarketHistory>>> GetMarketHistory([AliasAs("market")] string marketName);
  29.  
  30.         [Headers("Authorization: Custom")]
  31.         [Get("/market/buylimit")]
  32.         Task<IRespone<BaseOrder>> CreateBuyOrder([AliasAs("apikey")] string apiKey, [AliasAs("market")] string marketName, [AliasAs("quantity")] double quantity, [AliasAs("rate")] double rate, [AliasAs("nonce")] string nonce);
  33.  
  34.         [Headers("Authorization: Custom")]
  35.         [Get("/market/selllimit")]
  36.         Task<IRespone<BaseOrder>> CreateSellOrder([AliasAs("apikey")] string apiKey, [AliasAs("market")] string marketName, [AliasAs("quantity")] double quantity, [AliasAs("rate")] double rate, [AliasAs("nonce")] string nonce);
  37.  
  38.         [Headers("Authorization: Custom")]
  39.         [Get("/market/cancel")]
  40.         Task<IRespone<object>> CancelOrder([AliasAs("apikey")] string apiKey, [AliasAs("uuid")] string orderId);
  41.  
  42.         [Headers("Authorization: Custom")]
  43.         [Get("/account/getwithdrawalhistory")]
  44.         Task<IRespone<IReadOnlyCollection<Payment>>> GetWithdrawalHistory([AliasAs("apikey")] string apiKey, [AliasAs("currency")] string currencyShortName, [AliasAs("nonce")] string nonce);
  45.  
  46.         [Headers("Authorization: Custom")]
  47.         [Get("/account/getdeposithistory")]
  48.         Task<IRespone<IReadOnlyCollection<Payment>>> GetDepositHistory([AliasAs("apikey")] string apiKey, [AliasAs("currency")] string currencyShortName, [AliasAs("nonce")] string nonce);
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement