Skip to content

Commit 16b03e0

Browse files
committed
vwap indicator test
1 parent e77ee5a commit 16b03e0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test_vwap.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import requests
2+
from legitindicators import atr
3+
4+
BINANCE_URL = "https://api.binance.com/api/v3/klines"
5+
SYMBOL = "BTCUSDT"
6+
INTERVAL = "1h"
7+
PARAMS = {"symbol": SYMBOL, "interval": INTERVAL}
8+
9+
10+
def test_atr():
11+
response = requests.get(url=BINANCE_URL, params=PARAMS)
12+
data = response.json()
13+
open = [float(o[1]) for o in data]
14+
high = [float(h[2]) for h in data]
15+
low = [float(lo[3]) for lo in data]
16+
close = [float(c[4]) for c in data]
17+
18+
print(data)

0 commit comments

Comments
 (0)