Removed test file
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
Mix.install([
|
||||
{:req, "~> 0.5.0"}
|
||||
])
|
||||
|
||||
alias Req
|
||||
res = Req.get!("https://api.github.com/repos/wojtekmach/req").body["description"]
|
||||
IO.inspect(res)
|
||||
|
||||
url = "https://api.tradier.com/v1/user/profile"
|
||||
token = System.get_env("TRADIER_API_KEY") || raise "TRADIER_API_KEY environment variable not set"
|
||||
|
||||
account_id =
|
||||
System.get_env("TRADIER_ACCOUNT") || raise "TRADIER_ACCOUNT environment variable not set"
|
||||
|
||||
response =
|
||||
Req.get(url,
|
||||
headers: [
|
||||
Accept: "application/json",
|
||||
Authorization: "Bearer #{token}"
|
||||
]
|
||||
)
|
||||
|
||||
IO.inspect(response)
|
||||
|
||||
account_url = "https://api.tradier.com/v1/accounts/#{account_id}/balances"
|
||||
|
||||
response =
|
||||
Req.get(account_url,
|
||||
headers: [
|
||||
Accept: "application/json",
|
||||
Authorization: "Bearer #{token}"
|
||||
]
|
||||
)
|
||||
|
||||
IO.inspect(response)
|
||||
|
||||
position_url = "https://api.tradier.com/v1/accounts/#{account_id}/positions"
|
||||
|
||||
response =
|
||||
Req.get(position_url,
|
||||
headers: [
|
||||
Accept: "application/json",
|
||||
Authorization: "Bearer #{token}"
|
||||
]
|
||||
)
|
||||
|
||||
IO.inspect(response)
|
||||
Reference in New Issue
Block a user