public static async Task <QuestradeAccounts> FindAccountsAsync(AccessToken accessToken)
        {
            var client = new QuestradeClient(accessToken.Value);
            var data   = await client.SendAsync(new HttpRequestMessage
            {
                RequestUri = new Uri($"{accessToken.ApiServer}v1/accounts"),
                Method     = HttpMethod.Get
            });

            return(JsonConvert.DeserializeObject <QuestradeAccounts>(data));
        }
Esempio n. 2
0
        static async Task <QuestradeSymbols> FindAsync(string filter, AccessToken accessToken)
        {
            var client = new QuestradeClient(accessToken.Value);
            var data   = await client.SendAsync(new HttpRequestMessage
            {
                RequestUri = new Uri($"{accessToken.ApiServer}v1/symbols{filter}"),
                Method     = HttpMethod.Get
            });

            return(JsonConvert.DeserializeObject <QuestradeSymbols>(data));
        }