예제 #1
0
 public static ApiRequestBuilder <CandleSet> GetCandles(this GdaxApiClient api, string productId, DateTimeOffset start, DateTimeOffset end, TimeSpan granularity)
 {
     return(api.Get <CandleSet>($"products/{productId}/candles")
            .AddQueryParam("start", start.ToString("u"))
            .AddQueryParam("end", end.ToString("u"))
            .AddQueryParam("granularity", (int)granularity.TotalSeconds));
 }
예제 #2
0
 public static ApiRequestBuilder <Page <Product, long> > GetProducts(this GdaxApiClient api)
 {
     return(api.Get <Page <Product, long> >("products"));
 }
예제 #3
0
 public static ApiRequestBuilder <Last24HourStat> GetStats(this GdaxApiClient api, string productId)
 {
     return(api.Get <Last24HourStat>($"products/{productId}/stats"));
 }
예제 #4
0
 public static ApiRequestBuilder <AggregatedBook> GetBookLevel1(this GdaxApiClient api, string productId)
 {
     return(api.Get <AggregatedBook>($"products/{productId}/book")
            .AddQueryParam("level", 1));
 }
예제 #5
0
 public static ApiRequestBuilder <Page <Trade, long> > GetTrades(this GdaxApiClient api, string productId)
 {
     return(api.Get <Page <Trade, long> >($"products/{productId}/trades"));
 }
예제 #6
0
 public static ApiRequestBuilder <Page <Order, DateTimeOffset> > GetAllOrders(this GdaxApiClient api)
 {
     return(api.Get <Page <Order, DateTimeOffset> >("orders")
            .AddQueryParam("status", "all"));
 }
예제 #7
0
 public static ApiRequestBuilder <ApiTime> GetTime(this GdaxApiClient api)
 {
     return(api.Get <ApiTime>("time"));
 }
예제 #8
0
 public static ApiRequestBuilder <Currency[]> GetCurrencies(this GdaxApiClient api)
 {
     return(api.Get <Currency[]>("currencies"));
 }