-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigs.py
45 lines (36 loc) · 910 Bytes
/
configs.py
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
37
38
39
40
41
42
43
44
45
import json
# Your API Key
API_KEY = 'Bearer YOUR_KEY_HERE'
ACCOUNT_ID = 'YOUR_ACCOUNT_ID_HERE'
HEADERS = {
'Content-Type': 'application/json',
'Authorization': API_KEY
}
# format: 'Currency1_Currency2'
INSTRUMENT = 'EUR_USD'
# Candlestick timeframe - https://developer.oanda.com/rest-live-v20/instrument-df/ for options
GRANULARITY = 'M1'
# EMA Periods
FAST = 1
SLOW = 2
# Order Settings - https://developer.oanda.com/rest-live-v20/order-df/ for options
UNITS = '1'
TIME_IN_FORCE = 'FOK'
BUY = json.dumps({
"order": {
"timeInForce": TIME_IN_FORCE,
"instrument": INSTRUMENT,
"units": UNITS,
"type": "MARKET",
"positionFill": "DEFAULT"
}
})
SELL = json.dumps({
"order": {
"timeInForce": TIME_IN_FORCE,
"instrument": INSTRUMENT,
"units": '-' + UNITS,
"type": "MARKET",
"positionFill": "DEFAULT"
}
})