Account summary trading information
Field | Type | Label | Description |
Balance | double | Balance |
|
Credit | double | Credit |
|
Profit | double | Profit |
|
Equity | double | Equity |
|
Margin | double | Used margin |
|
FreeMargin | double | Free margin |
|
MarginLevel | double | Margin percent |
|
Leverage | double | Leverage |
|
Currency | string | Currency |
|
Type | AccountType | Demo, contest, real |
|
IsInvestor | bool | Investor mode (without trading) |
Field | Type | Label | Description |
result | AccountSummary |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Quote history bar.
Field | Type | Label | Description |
Time | google.protobuf.Timestamp | Bar open time. |
|
Open | double | Open price. |
|
High | double | Maximum price. |
|
Low | double | Minimum price. |
|
Close | double | Close price. |
|
Volume | double | Volume. |
QuoteHistoryMany reply
Field | Type | Label | Description |
Symbol | string | Symbols |
|
Bars | Bar | repeated | Bars |
Exception | string | Error details |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Client ID with connection status
Field | Type | Label | Description |
Id | string | Token |
|
Connected | bool | Connection status |
|
User | int32 | User |
|
Host | string | Host |
|
Port | int32 | Port |
Field | Type | Label | Description |
result | Order | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
companyName | string |
|
|
results | Result | repeated |
|
Security group configuration for client group
Field | Type | Label | Description |
MinLot | double | Minimum lot size |
|
MaxLot | double | Maximum lot size |
|
LotStep | double | Lot step |
|
show | int32 | enable show and trade for this group of securites |
|
trade | int32 | enable show and trade for this group of securites |
|
execution | int32 | dealing mode-EXECUTION_MANUAL,EXECUTION_AUTO,EXECUTION_ACTIVITY |
|
comm_base | double | standart commission |
|
comm_type | int32 | commission type-COMM_TYPE_MONEY,COMM_TYPE_PIPS,COMM_TYPE_PERCENT |
|
comm_lots | int32 | commission lots mode-COMMISSION_PER_LOT,COMMISSION_PER_DEAL |
|
comm_agent | double | agent commission |
|
comm_agent_type | int32 | agent commission mode-COMM_TYPE_MONEY, COMM_TYPE_PIPS |
|
spread_diff | int32 | spread difference in compare with default security spread |
|
lot_min | int32 | allowed minimal and maximal lot values |
|
lot_max | int32 | allowed minimal and maximal lot values |
|
ie_deviation | int32 | maximum price deviation in Instant Execution mode |
|
confirmation | int32 | use confirmation in Request mode |
|
trade_rights | int32 | clients trade rights-bit mask see TRADE_DENY_NONE,TRADE_DENY_CLOSEBY,TRADE_DENY_MUCLOSEBY |
|
ie_quick_mode | int32 | ie quick mode |
|
autocloseout_mode | int32 | auto close-out modes see CLOSE_OUT_NONE,CLOSE_OUT_HIHI, CLOSE_OUT_LOLO, CLOSE_OUT_HILO, CLOSE_OUT_LOHI,CLOSE_OUT_LOHI,CLOSE_OUT_FIFO,CLOSE_OUT_LIFO,CLOSE_OUT_INTRDAY_FIFO |
|
comm_tax | double | commission taxes |
|
comm_agent_lots | int32 | agent commission lots mode-COMMISSION_PER_LOT,COMMISSION_PER_DEAL |
|
freemargin_mode | int32 | free margin check mode |
|
reserved | int32 | repeated | reserved |
Security sessions configurations
Field | Type | Label | Description |
open_hour | int32 | session open time: hour and minute |
|
open_min | int32 | session open time: hour and minute |
|
close_hour | int32 | session close time: hour and minute |
|
close_min | int32 | session close time: hour and minute |
|
open | int32 | session open time: hour and minute |
|
close | int32 | session close time: hour and minute |
|
align | int32 | repeated | for internal usage |
Sessions.
Field | Type | Label | Description |
quote | ConSession | repeated | quote sessions |
trade | ConSession | repeated | trade sessions |
quote_overnight | int32 | for internal usage |
|
trade_overnight | int32 | for internal usage |
|
reserved | int32 | repeated | reserved |
Symbol groups
Field | Type | Label | Description |
name | string | group name |
|
description | string | group description |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"user": "21455",
"password": "1nJeS+Ae",
"host": "95.217.147.61",
"port": "443",
"proxyUser": "ProxyUser123",
"proxyPassword": "qwerty123",
"proxyHost": "65.108.126.217",
"proxyPort": "1080",
"proxyType": "Socks5"
}
Field | Type | Label | Description |
user | int32 | Account number. [Required] |
|
password | string | Password. [Required] |
|
host | string | Host - ip adddress or dns name. [Required] |
|
port | int32 | Port. [Required] |
|
proxyUser | string | Proxy user [Required] |
|
proxyPassword | string | Proxy password [Required] |
|
proxyHost | string | Proxy server ip adddress [Required] |
|
proxyPort | int32 | Proxy port [Required] |
|
proxyType | ProxyTypes | Proxy type. Put 'Socks5' for default parameters [Required] |
|
id | string | optional | Token returned by 'Connect' method |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"user": "500476959",
"password": "ehj4bod",
"host": "mt4-demo.roboforex.com",
"port": "443"
}
Field | Type | Label | Description |
user | int32 | Account number [Required] |
|
password | string | Password [Required] |
|
host | string | Host - ip adddress or dns name [Required] |
|
port | int32 | Port [Required] |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
code | ErrorCode |
|
|
message | string |
|
|
stackTrace | string |
|
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method |
Field | Type | Label | Description |
result | ClientStatus | repeated |
|
error | Error |
|
Field | Type | Label | Description |
result | LogRec | repeated |
|
error | Error |
|
[Example]
{
"user": "500476959",
"password": "ehj4bod"
}
Field | Type | Label | Description |
user | int32 | Account number [Required] |
|
password | string | Password [Required] |
Field | Type | Label | Description |
result | LogRec | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
result | QuoteEventArgs | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt5",
"msNotOlder": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbols | string | repeated | Symbols [Required] |
msNotOlder | int32 | optional | If last quote arrived less than msOlderMs milliseconds ago function returns last quote, overwise - wait for new quote. If zero - always returns last quote. |
Field | Type | Label | Description |
result | ConSymbolGroup | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
result | bool |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
Time | google.protobuf.Timestamp |
|
|
Level | LogEventLevel |
|
|
Message | string |
|
|
Id | string |
|
|
User | int32 |
|
|
Password | string |
|
Field | Type | Label | Description |
Is64BitProcess | bool |
|
|
PhysicalMemoryUsage | int32 |
|
|
BasePriority | int32 |
|
|
PriorityClass | string |
|
|
UserProcessorTime | string |
|
|
PrivilegedProcessorTime | string |
|
|
TotalProcessorTime | string |
|
|
PagedSystemMemorySize | int32 |
|
|
PagedMemorySize | int32 |
|
|
PeakPagedMem | int32 |
|
|
PeakVirtualMem | int32 |
|
|
PeakWorkingSet | int32 |
|
|
MemoryLoadBytes | int32 |
|
|
HeapSizeBytes | int32 |
|
|
FragmentedBytes | int32 |
|
|
HighMemoryLoadThresholdBytes | int32 |
|
|
TotalAvailableMemoryBytes | int32 |
|
|
Responding | bool |
|
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
Field | Type | Label | Description |
result | MemUsage |
|
|
error | Error |
|
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method |
Field | Type | Label | Description |
result | ProfitUpdate |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method |
Field | Type | Label | Description |
result | OrderUpdateSummary |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method |
Field | Type | Label | Description |
result | QuoteHistoryEventArgs |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method |
Field | Type | Label | Description |
result | QuoteEventArgs |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method |
Field | Type | Label | Description |
result | SymbolTickValue |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method |
Field | Type | Label | Description |
result | Order |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"ticket": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
ticket | int32 | Ticket number [Required] |
Field | Type | Label | Description |
result | Order | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Contains order data.
Field | Type | Label | Description |
PlacedType | PlacedType | Placed manually or by expert |
|
Ticket | int32 | Ticket number. |
|
OpenTime | google.protobuf.Timestamp | Open time. |
|
CloseTime | google.protobuf.Timestamp | Close time. Just for history orders. |
|
Expiration | google.protobuf.Timestamp | Expiration time of pending order. |
|
Type | Op | Order type. |
|
Lots | double | Amount of lots. Be carefull some brokers use non standart lots. |
|
Symbol | string | Trading instrument. |
|
OpenPrice | double | Open price. |
|
StopLoss | double | Stop loss. |
|
TakeProfit | double | Take profit. |
|
ClosePrice | double | Close price. Just for history orders. |
|
MagicNumber | int32 | Identifying (magic) number. |
|
Swap | double | Swap value. |
|
Commission | double | Commission value. |
|
Comment | string | Order comment. |
|
Profit | double | Net profit value (without swaps or commissions) in base currency. |
|
RateOpen | double | Convertation rate from profit currency to group deposit currency for open time. |
|
RateClose | double | Convertation rate from profit currency to group deposit currency for close time. |
|
RateMargin | double | Rate of convertation from margin currency to deposit one. |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"ticket1": "0",
"ticket2": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
ticket1 | int32 | Order ticket [Required] |
|
ticket2 | int32 | Order ticket [Required] |
Field | Type | Label | Description |
result | Order |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"ticket": "0",
"lots": "0",
"price": "0",
"slippage": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
ticket | int32 | Ticket number [Required] |
|
lots | double | Lots |
|
price | double | Price. Optional, but required in case of Instant Execution. |
|
slippage | int32 | Slippage. Optional. |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"ticket": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
ticket | int32 | Ticket number [Required] |
Field | Type | Label | Description |
result | Order | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"from": "2022-01-01T00:00:00",
"to": "2023-06-01T00:00:00"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
from | string | 'From date' in format: yyyy-MM-ddTHH:mm:ss [Required] |
|
to | string | 'To date' in format: yyyy-MM-ddTHH:mm:ss |
Field | Type | Label | Description |
result | Order |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"ticket": "0",
"stoploss": "0",
"takeprofit": "0",
"price": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
ticket | int32 | Ticket number [Required] |
|
stoploss | double | StopLoss. Optional. [Required] |
|
takeprofit | double | TakeProfit. Optional. [Required] |
|
price | double | Price. Optional, but required in case of Instant Execution. |
|
expiration | string | Expiartion in format: yyyy-MM-ddTHH:mm:ss. Optional. |
Field | Type | Label | Description |
result | Order |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"symbol": "EURUSD",
"operation": "Buy",
"volume": "0.1",
"price": "0",
"slippage": "0",
"stoploss": "0",
"takeprofit": "0",
"magic": "0",
"placedType": "Client"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | Symbol [Required] |
|
operation | Op | Buy, Sell, BuyLimit, SellLimit, BuyStop, SellStop [Required] |
|
volume | double | Lots [Required] |
|
price | double | Price. Optional, but required in case of Instant Execution. |
|
slippage | int32 | Slippage. Optional. |
|
stoploss | double | StopLoss. Optional. |
|
takeprofit | double | TakeProfit. Optional. |
|
comment | string | Comment. Optional. |
|
magic | int32 | Magic. Optional. |
|
expiration | string | Expiartion in format: yyyy-MM-ddTHH:mm:ss. Optional. |
|
placedType | PlacedType | Placed type |
Arguments for OrderUpdate event.
Field | Type | Label | Description |
Order | Order | Updated order. |
|
Action | UpdateAction | Update action. |
Order update event details
Field | Type | Label | Description |
Update | OrderUpdateEventArgs | Order and update action |
|
Balance | double | Balance |
|
Credit | double | Credit |
|
Profit | double | Account profit |
|
Equity | double | Equity |
|
Margin | double | Used margin |
|
FreeMargin | double | Free margin |
|
MarginLevel | double | Margin percent |
|
Leverage | double | Leverage |
|
Currency | string | Currency |
|
Type | AccountType | Demo, contest, real |
|
IsInvestor | bool | Investor mode (without trading) |
|
OpenedOrders | Order | repeated | Opened orders |
Field | Type | Label | Description |
result | int32 | repeated |
|
error | Error |
|
Field | Type | Label | Description |
hosts | string | repeated | List IP adresses or domain names joined with port by ':' symbol [Required] |
Field | Type | Label | Description |
result | int32 |
|
|
error | Error |
|
[Example]
{
"host": "mt4-demo.roboforex.com",
"port": "443"
}
Field | Type | Label | Description |
host | string | Host - ip adddress or dns name [Required] |
|
port | int32 | Port |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
Profit update message
Field | Type | Label | Description |
Balance | double | Balance |
|
Credit | double | Credit |
|
Profit | double | Account profit |
|
Equity | double | Equity |
|
Margin | double | Used margin |
|
FreeMargin | double | Free margin |
|
MarginLevel | double | Margin percent |
|
Leverage | double | Leverage |
|
Currency | string | Currency |
|
Type | AccountType | Demo, contest, real |
|
IsInvestor | bool | Investor mode (without trading) |
|
Orders | Order | repeated | Opened orders |
New quote event arguments.
Field | Type | Label | Description |
Symbol | string | Trading instrument. |
|
Bid | double | Bid. |
|
Ask | double | Ask. |
|
Time | google.protobuf.Timestamp | Server time. |
|
High | double | High. |
|
Low | double | Low. |
Quote history event args.
Field | Type | Label | Description |
Symbol | string | Instrument. |
|
Timeframe | Timeframe | Timeframe. |
|
Bars | Bar | repeated | History bars. |
Field | Type | Label | Description |
result | BarsForSymbol | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"timeframe": "D1",
"from": "2022-10-01T00:00:00",
"count": "10"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | repeated | Symbol [Required] |
timeframe | Timeframe | Timeframe. M1,M5,M15,M30,H1,H4,D1,W1,MN1 [Required] |
|
from | string | 'From date' in format: yyyy-MM-ddTHH:mm:ss [Required] |
|
count | int32 | Number of bars back from specified date. [Required] |
Field | Type | Label | Description |
result | Bar | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"symbol": "EURUSD",
"timeframe": "D1",
"from": "2022-10-01T00:00:00",
"count": "10"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | Symbol [Required] |
|
timeframe | Timeframe | Timeframe. M1,M5,M15,M30,H1,H4,D1,W1,MN1 [Required] |
|
from | string | 'From date' in format: yyyy-MM-ddTHH:mm:ss [Required] |
|
count | int32 | Number of bars back from specified date. [Required] |
Field | Type | Label | Description |
result | QuoteEventArgs |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"symbol": "EURUSD"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | Symbol [Required] |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"symbol": "EURUSD",
"timeframe": "D1",
"from": "2022-10-01T00:00:00",
"count": "10"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | Symbol [Required] |
|
timeframe | Timeframe | Timeframe. M1,M5,M15,M30,H1,H4,D1,W1,MN1 [Required] |
|
from | string | 'From date' in format: yyyy-MM-ddTHH:mm:ss [Required] |
|
count | int32 | Number of bars back from specified date. [Required] |
Field | Type | Label | Description |
name | string |
|
|
access | string | repeated |
|
Field | Type | Label | Description |
result | Company | repeated |
|
error | Error |
|
[Example]
{
"company": ""
}
Field | Type | Label | Description |
company | string | Company name [Required] |
Field | Type | Label | Description |
result | int32 |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
result | Order | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"type": "Client"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
type | PlacedType | Placed type |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"interval": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbols | string | repeated | Required symbols |
interval | int32 | Minimum interval between events in milliseconds |
Field | Type | Label | Description |
result | Order | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
result | Order | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"symbol": "EURUSD",
"interval": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | Symbol [Required] |
|
interval | int32 | Minimum interval between events in milliseconds |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"symbol": "EURUSD",
"interval": "0"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | Symbol [Required] |
|
interval | int32 | Minimum interval between events in milliseconds |
Instrument parameters.
Field | Type | Label | Description |
Execution | Execution | Execution type. |
|
StopsLevel | int32 | Stop level in points. |
|
Digits | int32 | Count of digits after decimal point in the symbol prices. |
|
Point | double | Point size in the quote currency. |
|
SwapLong | double | Swap of the long position. |
|
SwapShort | double | Swap of the short position. |
|
Spread | int32 | Spread value in pips.QuoteClient QC |
|
FreezeLevel | int32 | Order freeze level in points. If the execution price lies within the range defined by the freeze level, the order cannot be modified, cancelled or closed. |
|
MarginCurrency | string | Currency of margin requirments. |
|
ProfitMode | ProfitMode | Profit calculation mode. |
|
MarginMode | MarginMode | Margin calculation mode. |
|
ContractSize | double | Contract size. |
|
Currency | string | Currency. |
|
MarginDivider | double | Margin divider. |
|
Ex | SymbolInfoEx | Execution type. |
|
Code | int32 | Internal code. |
Security config
Field | Type | Label | Description |
symbol | int32 | repeated | name |
description | string | description |
|
source | string | synonym |
|
currency | string | currency |
|
type | int32 | security group (see ConSymbolGroup) |
|
digits | int32 | security precision |
|
trade | int32 | trade mode |
|
background_color | int32 | background color |
|
count | int32 | symbols index |
|
count_original | int32 | symbols index in market watch |
|
external_unused | int32 | repeated | internal |
realtime | int32 | allow real time quotes |
|
starting | int32 | trades starting date (UNIX time) |
|
expiration | int32 | trades end date (UNIX time) |
|
sessions | ConSessions | repeated | quote and trade sessions |
profit_mode | int32 | profit calculation mode |
|
profit_reserved | int32 | reserved |
|
filter | int32 | filter value |
|
filter_counter | int32 | filtration parameter |
|
filter_limit | double | max. permissible deviation from last quote (percents) |
|
filter_smoothing | int32 | smoothing |
|
filter_reserved | int32 | reserved |
|
logging | int32 | enable to log quotes |
|
spread | int32 | spread |
|
spread_balance | int32 | spread balance |
|
exemode | int32 | execution mode |
|
swap_enable | int32 | enable swaps |
|
swap_type | int32 | swap type |
|
swap_long | double | swaps values for long and short postions |
|
swap_short | double | swaps values for long and short postions |
|
swap_rollover3days | int32 | triple rollover day: 0-Monday, 1-Tuesday ... 4-Friday |
|
contract_size | double | contract size |
|
tick_value | double | one tick value |
|
tick_size | double | one tick size |
|
stops_level | int32 | stops deviation value |
|
gtc_pendings | int32 | GTC mode ORDERS_DAILY, ORDERS_GTC, ORDERS_DAILY_NO_STOPS |
|
margin_mode | int32 | margin calculation mode |
|
margin_initial | double | initial margin |
|
margin_maintenance | double | margin maintenance |
|
margin_hedged | double | hadget margin |
|
margin_divider | double | margin divider |
|
point | double | point size - (1/(10^digits) |
|
multiply | double | multiply 10^digits |
|
bid_tickvalue | double | tickvalue for bid |
|
ask_tickvalue | double | tickvalue for ask |
|
long_only | int32 | allow only BUY positions |
|
instant_max_volume | int32 | max. volume for Instant Execution |
|
margin_currency | string | currency of margin requirments |
|
freeze_level | int32 | modification freeze level (from market price) |
|
margin_hedged_strong | int32 | lock open checking mode |
|
value_date | int32 | value date for this security |
|
quotes_delay | int32 | quotes delay |
|
swap_openprice | int32 | use open price at swaps calculation in SWAP_BY_INTEREST mode |
|
unused | int32 | repeated | reserved |
Information about symbol and his group.
Field | Type | Label | Description |
SymbolName | string | Symbol name |
|
Symbol | SymbolInfo | Symbol name |
|
Group | ConSymbolGroup | Symbol group |
|
GroupParams | ConGroupSec | Symbol group parameters |
Field | Type | Label | Description |
result | SymbolParams | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbols | string | repeated | Required symbols |
Field | Type | Label | Description |
result | SymbolParams |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"symbol": "EURUSD"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | Symbol [Required] |
Tick value update
Field | Type | Label | Description |
Symbol | string | Symbol |
|
TickValue | double | Tick value |
Field | Type | Label | Description |
result | string | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
Tick value with tick size
Field | Type | Label | Description |
TickValue | double | Tick value |
|
TickSize | double | Tick size |
|
Symbol | string | Symbol |
Field | Type | Label | Description |
result | TickValueWithSize | repeated |
|
error | Error |
|
[Example]
{
"id": "demo-token-mt5"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | repeated | Symbol |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbols | string | repeated | Required symbols [Required] |
Field | Type | Label | Description |
result | string |
|
|
error | Error |
|
[Example]
{
"id": "demo-token-mt4",
"symbol": "EURUSD"
}
Field | Type | Label | Description |
id | string | Token returned by 'Connect' method [Required] |
|
symbol | string | Symbol [Required] |
Real, contest, demo
Name | Number | Description |
AccountType_Real | 0 | |
AccountType_Contest | 1 | |
AccountType_Demo | 2 |
Name | Number | Description |
INTERNAL_ERROR | 0 | |
COMMON_ERROR | 2 | |
INVALID_PARAM | 3 | |
SERVER_BUSY | 4 | |
OLD_VERSION | 5 | |
NO_CONNECT | 6 | |
NOT_ENOUGH_RIGHTS | 7 | |
TOO_FREQUENT_REQUEST | 8 | |
NO_CONNECTION | 10 | |
SERVICE_NOT_AVAILABLE | 11 | |
TOO_FREQUENT_REQUESTS | 12 | |
SECRET_KEY_REQUIRED | 13 | |
INVALID_ONETIME_PASSWORD | 14 | |
ACCOUNT_DISABLED | 64 | |
INVALID_ACCOUNT | 65 | |
PUBLIC_KEY_NOT_FOUND | 66 | |
TRADE_TIMEOUT | 128 | |
INVALID_PRICES | 129 | |
INVALID_SL_TP | 130 | |
INVALID_VOLUME | 131 | |
MARKET_CLOSED | 132 | |
TRADE_DISABLED | 133 | |
NOT_MONEY | 134 | |
PRICE_CHANGED | 135 | |
OFF_QUOTES | 136 | |
BROKER_BUSY | 137 | |
REQUOTE | 138 | |
ORDER_LOCKED | 139 | |
LONG_POS_ALLOWED | 140 | |
TOO_MANY_REQUESTS | 141 | |
ORDER_ACCEPTED | 142 | |
ORDER_IN_PROCESS | 143 | |
REQUEST_CANCELLED | 144 | |
MODIFICATIONS_DENIED | 145 | |
TRADE_CONTEXT_BUSY | 146 | |
EXPIRATION_DISABLED | 147 | |
TOO_MANY_ORDERS | 148 | |
HEDGE_PROHIBITED | 149 | |
RPROHIBITED_FIFO | 150 | |
INVALID_TOKEN | 256 | Custom error codes |
INVALID_SYMBOL | 257 | |
INVALID_TICKET | 258 | |
SAME_PARAMS | 259 | |
CONNECT_ERROR | 260 | |
TIMEOUT | 261 |
Execution type.
Name | Number | Description |
Execution_Request | 0 | Execution by request. |
Execution_Instant | 1 | Instant execution. |
Execution_Market | 2 | Market execition. |
Name | Number | Description |
LogEventLevel_Verbose | 0 | |
LogEventLevel_Debug | 1 | |
LogEventLevel_Information | 2 | |
LogEventLevel_Warning | 3 | |
LogEventLevel_Error | 4 | |
LogEventLevel_Fatal | 5 |
Margin types.
Name | Number | Description |
MarginMode_Forex | 0 | Forex. |
MarginMode_CFD | 1 | CFD. |
MarginMode_Futures | 2 | Futures. |
MarginMode_CfdIndex | 3 | CFD Index. |
MarginMode_CfdLeverage | 4 | CFD Leverage. |
Operation type for the OrderSend() function.
Name | Number | Description |
Op_Buy | 0 | Buying position. |
Op_Sell | 1 | Selling position. |
Op_BuyLimit | 2 | Buy limit pending position. |
Op_SellLimit | 3 | Sell limit pending position. |
Op_BuyStop | 4 | Buy stop pending position. |
Op_SellStop | 5 | Sell stop pending position. |
Op_Balance | 6 | Balance position. |
Op_Credit | 7 | Credit position. |
Placed manually or ByExpert
Name | Number | Description |
PlacedType_Client | 0 | |
PlacedType_Expert | 1 | |
PlacedType_Dealer | 2 | |
PlacedType_Signal | 3 | |
PlacedType_Gateway | 4 | |
PlacedType_Mobile | 5 | |
PlacedType_Web | 6 | |
PlacedType_Api | 7 | |
PlacedType_Default | 8 | In this case API uses OrderClient.PlaccedType field during OrderSend |
Profit types.
Name | Number | Description |
ProfitMode_Forex | 0 | Forex. |
ProfitMode_CFD | 1 | CFD. |
ProfitMode_Futures | 2 | Futures |
Specifies the type of proxy servers that an instance of the ProxySocket class can use.
Name | Number | Description |
ProxyTypes_None | 0 | No proxy server; the ProxySocket object behaves exactly like an ordinary Socket object. |
ProxyTypes_Https | 1 | A HTTPS (CONNECT) proxy server. |
ProxyTypes_Socks4 | 2 | A SOCKS4[A] proxy server. |
ProxyTypes_Socks5 | 3 | A SOCKS5 proxy server. |
Timeframe for quote history download.
Name | Number | Description |
TIMEFRAME_M0 | 0 | |
Timeframe_M1 | 1 | 1 minute. |
Timeframe_M5 | 5 | 5 minutes. |
Timeframe_M15 | 15 | 15 minutes. |
Timeframe_M30 | 30 | 30 minutes. |
Timeframe_H1 | 60 | 1 hour. |
Timeframe_H4 | 240 | 4 hour. |
Timeframe_D1 | 1440 | Daily. |
Timeframe_W1 | 10080 | Weekly. |
Timeframe_MN1 | 43200 | Monthly. |
Type of update action for OrderUpdate event.
Name | Number | Description |
UpdateAction_PositionOpen | 0 | New postion. |
UpdateAction_PositionClose | 1 | Position closed full or partially. |
UpdateAction_PositionModify | 2 | Position was modified. |
UpdateAction_PendingOpen | 3 | New pening order. |
UpdateAction_PendingClose | 4 | Pending order was deleted. |
UpdateAction_PendingModify | 5 | Pending order was modified. |
UpdateAction_PendingFill | 6 | Pending order was filled. |
UpdateAction_Balance | 7 | Balance update(deposit, withdraw). |
UpdateAction_Credit | 8 | Credit update. |
Method Name | Request Type | Response Type | Description |
Connect | ConnectRequest | ConnectReply | Connect to account with user, password, host, port. [Example] { "user": "500476959", "password": "ehj4bod", "host": "mt4-demo.roboforex.com", "port": "443" } |
ConnectProxy | ConnectProxyRequest | ConnectProxyReply | Connect to account with user, password, host, port. [Example] { "user": "500476959", "password": "ehj4bod", "host": "mt4-demo.roboforex.com", "port": "443", "proxyUser": "ProxyUser123", "proxyPassword": "qwerty123", "proxyHost": "65.108.126.217", "proxyPort": "1080", "proxyType": "Socks5" } |
CheckConnect | CheckConnectRequest | CheckConnectReply | Check connection state and reconnect if connection lost [Example] { "id": "demo-token-mt4" } |
Disconnect | DisconnectRequest | DisconnectReply | Disconnect from account [Example] { "id": "demo-token-mt4" } |
Method Name | Request Type | Response Type | Description |
AccountSummary | AccountSummaryRequest | AccountSummaryReply | Balance, Equity, Currency, FreeMargin, Margin, MarginLevel, Profit, Leverage, Credit [Example] { "id": "demo-token-mt4" } |
Groups | GroupsRequest | GroupsReply | Full infromation about symbol groups [Example] { "id": "demo-token-mt4" } |
Quote | QuoteRequest | QuoteReply | Get quote [Example] { "id": "demo-token-mt4", "symbol": "EURUSD" } |
GetQuoteMany | GetQuoteManyRequest | GetQuoteManyReply | Latest quote for the specified symbol [Example] { "id": "demo-token-mt5", "msNotOlder": "0" } |
OpenedOrders | OpenedOrdersRequest | OpenedOrdersReply | List of opened orders [Example] { "id": "demo-token-mt4" } |
Symbols | SymbolsRequest | SymbolsReply | List of symbols. [Example] { "id": "demo-token-mt4" } |
SymbolParams | SymbolParamsRequest | SymbolParamsReply | Full infromation about symbol and his group [Example] { "id": "demo-token-mt4", "symbol": "EURUSD" } |
ServerTimezone | ServerTimezoneRequest | ServerTimezoneReply | Server timezone. [Example] { "id": "demo-token-mt4" } |
SymbolParamsMany | SymbolParamsManyRequest | SymbolParamsManyReply | Full infromation about symbols [Example] { "id": "demo-token-mt4" } |
OpenedOrder | OpenedOrderRequest | OpenedOrderReply | List of opened orders [Example] { "id": "demo-token-mt4", "ticket": "0" } |
OrderHistory | OrderHistoryRequest | OrderHistoryReply | Order history [Example] { "id": "demo-token-mt4", "from": "2022-01-01T00:00:00", "to": "2023-06-01T00:00:00" } |
QuoteHistory | QuoteHistoryRequest | QuoteHistoryReply | Price history. [Example] { "id": "demo-token-mt4", "symbol": "EURUSD", "timeframe": "D1", "from": "2022-10-01T00:00:00", "count": "10" } |
QuoteHistoryMany | QuoteHistoryManyRequest | QuoteHistoryManyReply | Price history. [Example] { "id": "demo-token-mt4", "timeframe": "D1", "from": "2022-10-01T00:00:00", "count": "10" } |
ClosedOrders | ClosedOrdersRequest | ClosedOrdersReply | Last 10 orders that were closed during current session [Example] { "id": "demo-token-mt4" } |
RequestQuoteHistory | RequestQuoteHistoryRequest | RequestQuoteHistoryReply | Request price history and get result via /events socket connection [Example] { "id": "demo-token-mt4", "symbol": "EURUSD", "timeframe": "D1", "from": "2022-10-01T00:00:00", "count": "10" } |
SetPlacedType | SetPlacedTypeRequest | SetPlacedTypeReply | Subscribe for order profit updates and get results via /events socket connection [Example] { "id": "demo-token-mt4", "type": "Client" } |
IsInvestor | IsInvestorRequest | IsInvestorReply | Check investor mode. [Example] { "id": "demo-token-mt4" } |
TickValueWithSize | TickValueWithSizeRequest | TickValueWithSizeReply | Tick value with size. [Example] { "id": "demo-token-mt5" } |
Method Name | Request Type | Response Type | Description |
Ping | PingRequest | PingReply | Simple test without parameters |
PingHost | PingHostRequest | PingHostReply | Estimate time to connect to speciffied server and port in milliseconds [Example] { "host": "mt4-demo.roboforex.com", "port": "443" } |
PingHostMany | PingHostManyRequest | PingHostManyReply | Estimate time to connect to speciffied server and port in milliseconds |
GetLogs | GetLogsRequest | GetLogsReply | Logs for specified token [Example] { "id": "demo-token-mt4" } |
GetLogsByUser | GetLogsByUserRequest | GetLogsByUserReply | Logs for specified token [Example] { "user": "500476959", "password": "ehj4bod" } |
MemorySnapshot | MemorySnapshotRequest | MemorySnapshotReply | Memory snapshot |
Search | SearchRequest | SearchReply | Broker search by company name [Example] { "company": "" } |
GetClients | GetClientsRequest | GetClientsReply | Return all active with connection state |
MemoryUsage | MemoryUsageRequest | MemoryUsageReply | Memory usage details |
Method Name | Request Type | Response Type | Description |
OnOrderUpdate | OnOrderUpdateRequest | OnOrderUpdateReply stream | All trading activity on accont. [Example] { "id": "demo-token-mt4" } |
OnQuote | OnQuoteRequest | OnQuoteReply stream | Real time quotes. [Example] { "id": "demo-token-mt4" } |
OnTickValue | OnTickValueRequest | OnTickValueReply stream | Real time quotes. [Example] { "id": "demo-token-mt4" } |
OnOrderProfit | OnOrderProfitRequest | OnOrderProfitReply stream | Orders profits updates. [Example] { "id": "demo-token-mt4" } Quote history . [Example] { "id": "demo-token-mt4" } rpc OnQuoteHistory (OnQuoteHistoryRequest) returns (OnQuoteHistoryReply); On disconnect event. [Example] { "id": "demo-token-mt4" } rpc OnDisconnect (OnDisconnectRequest) returns (OnDisconnectReply); |
Method Name | Request Type | Response Type | Description |
Subscribe | SubscribeRequest | SubscribeReply | Subscribe symbol for real time quotes and get results via /events socket connection [Example] { "id": "demo-token-mt4", "symbol": "EURUSD", "interval": "0" } |
SubscribeMany | SubscribeManyRequest | SubscribeManyReply | Subscribe symbosl for real time quotes and get results via /events socket connection [Example] { "id": "demo-token-mt4", "interval": "0" } |
UnSubscribe | UnSubscribeRequest | UnSubscribeReply | Unsubscribe symbol for real time quotes and get results via /events socket connection [Example] { "id": "demo-token-mt4", "symbol": "EURUSD" } |
UnSubscribeMany | UnSubscribeManyRequest | UnSubscribeManyReply | UnSubscribe symbosls for real time quotes and get results via /events socket connection [Example] { "id": "demo-token-mt4" } |
SubscribeOrderProfit | SubscribeOrderProfitRequest | SubscribeOrderProfitReply | Subscribe for order profit updates and get results via /events socket connection [Example] { "id": "demo-token-mt4" } |
SubscribeTickValue | SubscribeTickValueRequest | SubscribeTickValueReply | Subscribe symbol for tick value updates [Example] { "id": "demo-token-mt4", "symbol": "EURUSD", "interval": "0" } |
SubscribeOrderUpdate | SubscribeOrderUpdateRequest | SubscribeOrderUpdateReply | Subscribe symbol for tick value updates [Example] { "id": "demo-token-mt4" } |
SubscribeQuoteHistory | SubscribeQuoteHistoryRequest | SubscribeQuoteHistoryReply | Subscribe quote history [Example] { "id": "demo-token-mt4" } |
Method Name | Request Type | Response Type | Description |
OrderSend | OrderSendRequest | OrderSendReply | Send market or pending order [Example] { "id": "demo-token-mt4", "symbol": "EURUSD", "operation": "Buy", "volume": "0.1", "price": "0", "slippage": "0", "stoploss": "0", "takeprofit": "0", "magic": "0", "placedType": "Client" } |
OrderModify | OrderModifyRequest | OrderModifyReply | Modify market or pending order [Example] { "id": "demo-token-mt4", "ticket": "0", "stoploss": "0", "takeprofit": "0", "price": "0" } |
OrderCloseBy | OrderCloseByRequest | OrderCloseByReply | Close market order with opposite market order [Example] { "id": "demo-token-mt4", "ticket1": "0", "ticket2": "0" } |
OrderDelete | OrderDeleteRequest | OrderDeleteReply | Delete pending order [Example] { "id": "demo-token-mt4", "ticket": "0" } |
OrderClose | OrderCloseRequest | OrderCloseReply | Close market order with opposite market order [Example] { "id": "demo-token-mt4", "ticket": "0", "lots": "0", "price": "0", "slippage": "0" } |
.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
double | double | double | float | float64 | double | float | Float | |
float | float | float | float | float32 | float | float | Float | |
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |