-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTesting Things.py
More file actions
37 lines (30 loc) · 824 Bytes
/
Copy pathTesting Things.py
File metadata and controls
37 lines (30 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from alpha_vantage.timeseries import TimeSeries
from alpha_vantage.foreignexchange import ForeignExchange
from pprint import pprint
from apikey import api_key
from multiprocessing import Process
from threading import Timer
import robin_stocks.helper as helper
import robin_stocks.urls as urls
import robin_stocks as r
import time
import datetime
import sys
import pandas as pd
import json
import requests
import json
import pprint
login = r.login('Username','Password')
def buyingPower():
data=r.load_phoenix_account(info=None)
return data
data=buyingPower()
obj=json.dumps(data)
# Declare class to store JSON data into a python dictionary
class read_data(object):
def __init__(self, jdata):
self.__dict__ = json.loads(jdata)
p = read_data(obj)
amount=float(p.crypto["equity"]["amount"])
print(amount)