Add symbol
AddSymbol¶
Description: Add a new trading symbol with full trading and configuration settings.
swap_type values:
- 0 = points
- 1 = money
- 2 = interest on nominal (lots * contract_size)
- 3 = margin currency
- 4 = interest using open price (lots * contract_size * open_price)
- 5 = interest using current price (lots * contract_size * current_price)
swap_daily values:
- 0 = default FX-style swap calendar
- 1 = charge swap every calendar day and ignore swap_rollover3days
Request Parameters¶
{
"symbol": "EURUSD",
"description": "Euro vs US Dollar",
"currency": "USD",
"sec_index": 1,
"sym_index": 100,
"sort_index": 0,
"digits": 5,
"trade": 1,
"sessions": [
{
"trade_overnight": 1,
"trade": [
{"open_hour": 0, "open_min": 0, "close_hour": 23, "close_min": 59},
{"open_hour": 0, "open_min": 0, "close_hour": 0, "close_min": 0},
{"open_hour": 0, "open_min": 0, "close_hour": 0, "close_min": 0}
]
},
"..."
],
"source": "FXSource",
"background_color": "#FFFFFF",
"count": 0,
"count_original": 0,
"profit_mode": 0,
"profit_reserved": 0,
"filter": 0,
"filter_counter": 0,
"filter_limit": 0.0,
"filter_smoothing": 0,
"filter_reserved": 0.0,
"logging": 1,
"spread": 20,
"spread_balance": 10,
"exemode": 1,
"swap_enable": 1,
"swap_type": 0,
// swap_type: 0=points, 1=money, 2=interest on nominal, 3=margin currency, 4=interest using open price, 5=interest using current price
"swap_long": -3.5,
"swap_short": 2.1,
"swap_rollover3days": 3,
"swap_daily": 0,
"contract_size": 100000.0,
"tick_value": 10.0,
"tick_size": 0.00001,
"stops_level": 5,
"gtc_pendings": 1,
"margin_mode": 0,
"margin_initial": 1000.0,
"margin_maintenance": 500.0,
"margin_hedged": 250.0,
"margin_divider": 1.0,
"point": 0.00001,
"multiply": 1.0,
"bid_tickvalue": 10.0,
"ask_tickvalue": 10.0,
"lasttime": 1629981234,
"bid": 1.2345,
"ask": 1.2346,
"long_only": 0,
"instant_max_volume": 100000,
"realtime": 1,
"starting": 0,
"expiration": 0,
"quote_currency": "USD",
"margin_currency": "USD",
"freeze_level": 0,
"margin_hedged_strong": 0,
"value_date": 0,
"quotes_delay": 0,
"swap_openprice": 0,
"swap_variation_margin": 0
}
Response Parameters¶
{
"data": "OK"
}