77
var content = new StringContent("[{\"trade_price\":8.9,\"trade_size\":18,\"time_stamp\":\"2019-01-18 11:45:23.467\",\"expiry\":\"2019-01-18\",\"root\":\"AMZN\",\"strike\":1702.5,\"option_type\":\"C\"}]", System.Text.Encoding.UTF8, "application/json");
1
// @nuget: Newtonsoft.Json
2
// @nuget: System.Net.Http
3
4
using Newtonsoft.Json.Linq;
5
using System;
6
using System.Collections.Generic;
7
using System.Net;
8
using System.Net.Http;
9
using System.Net.Http.Headers;
10
using System.Text;
11
using System.Threading;
12
13
public class Program
14
{
15
static string _baseURL = "https://sandbox.livevol.com/api/v1/delayed/";
16
public static void Main()
17
{
18
string idServerURL = "https://sandbox.livevol.com/id/connect/token";
19
string authenticationHeader = Convert.ToBase64String(Encoding.UTF8.GetBytes("sandbox_api_examples_client:api_example_secret")); // Sandbox
20
21
var accessToken = GetBearerToken(idServerURL, authenticationHeader);
22
23
if (!string.IsNullOrEmpty(accessToken))
24
{
Cached Result