Вы находитесь на странице: 1из 31

ABSTRACT

User Manual for Web API

WCF RESTFUL
Contents
1 Introduction .......................................................................................................................................... 4
2 How to Use ............................................................................................................................................ 4
3 Webservice Reference .......................................................................................................................... 4
3.1 Authenticate User ......................................................................................................................... 4
3.1.1 Inputs .................................................................................................................................... 4
3.1.2 Output ................................................................................................................................... 4
3.2 CreateAccount .............................................................................................................................. 4
3.2.1 Inputs .................................................................................................................................... 4
2.1.2 Output ................................................................................................................................... 6
3.3 ModifyAccount.............................................................................................................................. 6
3.3.1 Inputs .................................................................................................................................... 6
3.3.2 Output ................................................................................................................................... 7
3.4 GetAccounts .................................................................................................................................. 8
3.4.1 Inputs .................................................................................................................................... 8
3.4.2 Output ................................................................................................................................... 8
3.5 GetAccountInfo ............................................................................................................................. 8
3.5.1 Inputs .................................................................................................................................... 8
3.5.2 Output ................................................................................................................................... 8
3.6 CheckPassword ............................................................................................................................. 9
3.6.1 Inputs .................................................................................................................................... 9
3.6.2 Output ................................................................................................................................... 9
3.7 ChangePassword ........................................................................................................................... 9
3.7.1 Inputs .................................................................................................................................... 9
3.7.2 Output ................................................................................................................................. 10
3.8 GetAccountBalance ..................................................................................................................... 10
3.8.1 Inputs .................................................................................................................................. 10
3.8.2 Output ................................................................................................................................. 10
3.9 ChangeBalance ............................................................................................................................ 10
3.9.1 Inputs .................................................................................................................................. 11
3.9.2 Output ................................................................................................................................. 11
3.10 ChangeCredit............................................................................................................................... 11

User Manual for Web API


FxBrokerTools
3.10.1 Inputs .................................................................................................................................. 11
3.10.2 Output ................................................................................................................................. 11
3.11 GetGroups ................................................................................................................................... 12
3.11.1 Inputs .................................................................................................................................. 12
3.11.2 Output ................................................................................................................................. 12
3.12 GetGroupRecord ......................................................................................................................... 13
3.12.1 Inputs .................................................................................................................................. 13
3.12.2 Output ................................................................................................................................. 13
3.13 GetTradeHistory .......................................................................................................................... 14
3.13.1 Inputs .................................................................................................................................. 14
3.13.2 Output ................................................................................................................................. 15
3.14 GetJournal ................................................................................................................................... 15
3.14.1 Inputs .................................................................................................................................. 15
3.14.2 Output ................................................................................................................................. 15
3.15 GetMarginInfo............................................................................................................................. 16
3.15.1 Inputs .................................................................................................................................. 16
3.15.2 Output ................................................................................................................................. 16
3.16 GetOpenOrders ........................................................................................................................... 16
3.16.1 Inputs .................................................................................................................................. 16
3.16.2 Output ................................................................................................................................. 16
3.17 SymbolsGetAll ............................................................................................................................. 17
3.17.1 Inputs .................................................................................................................................. 17
3.17.2 Output ................................................................................................................................. 17
3.18 OpenOrder .................................................................................................................................. 17
3.18.1 Inputs .................................................................................................................................. 17
3.18.2 Output ................................................................................................................................. 18
3.19 ModifyOrder ............................................................................................................................... 18
3.19.1 Inputs .................................................................................................................................. 18
3.19.2 Output ................................................................................................................................. 19
3.20 OpenPendingOrder ..................................................................................................................... 19
3.20.1 Inputs .................................................................................................................................. 19
3.20.2 Output ................................................................................................................................. 20

User Manual for Web API


FxBrokerTools
3.21 ModifyPendingOrder .................................................................................................................. 20
3.21.1 Inputs .................................................................................................................................. 21
3.21.2 Output ................................................................................................................................. 21
3.22 CloseOrder .................................................................................................................................. 22
3.22.1 Inputs .................................................................................................................................. 22
3.22.2 Output ................................................................................................................................. 22
3.23 DeleteOrder ................................................................................................................................ 23
3.23.1 Inputs .................................................................................................................................. 23
3.23.2 Output ................................................................................................................................. 23
3.24 SendMail ..................................................................................................................................... 24
3.24.1 Inputs .................................................................................................................................. 24
3.24.2 Output ................................................................................................................................. 24
3.25 TransferBalance .......................................................................................................................... 24
3.25.1 Inputs .................................................................................................................................. 24
3.25.2 Output ................................................................................................................................. 24
3.26 GetLeverageOfGroup .................................................................................................................. 25
3.26.1 Inputs .................................................................................................................................. 25
3.26.2 Output ................................................................................................................................. 25
3.27 GetAllLeverage ............................................................................................................................ 25
3.27.1 Inputs .................................................................................................................................. 25
3.27.2 Output ................................................................................................................................. 25
3.28 AccountHaveTrades .................................................................................................................... 26
4 Service Calls......................................................................................................................................... 26

User Manual for Web API


FxBrokerTools
1 Introduction
This is documentation for MT4 Web API. The document discusses various functions exposed and the
response format for each of them.

2 How to Use
Authenticate the user by passing the correct username and the password. If the username and
password is valid we generate the taken id. The username and password is provided by us.
The generated token id can be used to pass in every function.
The particular session would be available for only 20 minutes after that the session got expired
and the user needs to login again.

3 Webservice Reference
The web service URL is the URL where the web services are installed.

3.1 Authenticate User


To Authenticate the User.

3.1.1 Inputs
SNo Name Desc Type

1 UserName (Mandatory) Trader Username string

2 Password (Mandatory) Trader Password String

3.1.2 Output
The Output is in the JSON format like

1045789231411:55:02

3.2 CreateAccount
To create trader Account.

3.2.1 Inputs
SNo Name Desc Type

1 Login login int

2 group (mandatory) group string

3 Password password string

4 Enable enable int

5 enable_change_password allow to change password int

User Manual for Web API


FxBrokerTools
6 enable_read_only allow to open/positions (TRUE-may int
not

7 password_investor read-only mode password up to 16 string


char

8 password_phone phone password up to 32 char string

9 Name (mandatory) name up to 128 char string

10 Country (mandatory) country up to 32 char e.g."India" string

11 City city up to 32 char string

12 State state up to 32 char string

13 Zipcode zipcode up to 16 char string

14 Address address up to 128 char string

15 Phone phone up to 32 char string

16 Email email up to 48 char string

17 Comment comment up to 64 char string

18 Id SSN (IRD) up to 32 char string

19 Status status up to 6 char string

20 Leverage leverage int

21 agent_account agent account int

22 Balance balance double

23 Prevmonthbalance previous month balance double

24 Prevbalance previous day balance double

25 Credit credit double

26 Interestrate accumulated interest rate double

27 Taxes taxes double

28 Prevmonthequity previous month equity double

29 Prevequity previous day equity double

User Manual for Web API


FxBrokerTools
30 Publickey public key upto 272 char int

31 end_reports enable send reports by email int

32 Mqid unsigned int

2.1.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. Login Id
2. Password
3. Investor Password

3.3 ModifyAccount
To modify Trader account.

3.3.1 Inputs
SNo Name Desc Type

1 Login (mandatory) login int

2 group(mandatory) group string

3 Password password string

4 Enable enable int

5 enable_change_password allow to change password int

6 enable_read_only allow to open/positions (TRUE-may int


not

7 password_investor read-only mode password up to 16 string


char

8 password_phone phone password up to 32 char string

9 name name up to 128 char string

User Manual for Web API


FxBrokerTools
10 country country up to 32 char string

11 City city up to 32 char string

12 State state up to 32 char string

13 Zipcode zipcode up to 16 char string

14 Address address up to 128 char string

15 Phone phone up to 32 char string

16 Email email up to 48 char string

17 Comment comment up to 64 char string

18 Id SSN (IRD) up to 32 char string

19 Status status up to 6 char string

20 Leverage leverage int

21 agent_account agent account int

22 Balance balance double

23 prevmonthbalance previous month balance double

24 Prevbalance previous day balance double

25 Credit credit double

26 Interestrate accumulated interest rate double

27 Taxes taxes double

28 prevmonthequity previous month equity double

29 Prevequity previous day equity double

30 Publickey public key upto 272 char int

31 end_reports enable send reports by email int

32 Mqid unsigned int

3.3.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

User Manual for Web API


FxBrokerTools
1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

3.4 GetAccounts
Get trader account details of manager.

3.4.1 Inputs
None

e.g. "1,GetAccounts"

Here 1 is SERVERNAME.

3.4.2 Output
The output is in form of JSON format with following description.

1. {"Accounts":[{"address":"","balance":15141.66,"city":"","country":"United
States","credit":0,"email":"","group":"TSTRADE1","leverage":100,"login":18138,"name":"Bhaskar
Roy","phone":"","regdate":1454398356,"state":"","zipcode":""},{"address":"","balance":23607.3
4,"city":"","country":"United
States","credit":0,"email":"","group":"TSTRADE1","leverage":100,"login":18141,"name":"Master
1","phone":"","regdate":1454406970,"state":"","zipcode":""}],"TotalAccounts":2,"isLast":0,"mess
age":"OK","msgtype":79,"result":0}

3.5 GetAccountInfo
To get account information of a trader.

3.5.1 Inputs
SNo Name Desc Type

1 AccountNo(Mandatory) Trader loginId int

3.5.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Common Error

User Manual for Web API


FxBrokerTools
And in case of successful operation, the output is

1. Login
2. Balance
3. Phone
4. Email
5. Address
6. City
7. State
8. Country

3.6 CheckPassword
To verify trader password.

3.6.1 Inputs
SNo Name Desc Type

1 AccountNo (Mandatory) Trader loginId Int

2 Password (Mandatory) Trader Password String

3.6.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

3.7 ChangePassword
To change password of trader account.

3.7.1 Inputs
SNo Name Desc Type

1 AccountNo (Mandatory) Trader loginId Int

2 Password (Mandatory) Trader Password string

3 New Password(Mandatory) New Password should not more than string

User Manual for Web API


FxBrokerTools
16 character.

Password must be at least 5


character long and at least two or
three type present - lowercase ,
uppercase ,digit.

3.7.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

3.8 GetAccountBalance
To get trader account balance.

3.8.1 Inputs
SNo Name Desc Type

1 AccountNo(Mandatory) Trader loginId int

3.8.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Common Error
3. "Invalid Account No."

And in case of successful operation, the output is

1. Balance
3.9 ChangeBalance
To change trader account balance.

User Manual for Web API


FxBrokerTools
3.9.1 Inputs
SNo Name Desc Type

1 AccountNo(Mandatory) Trader loginId int

2 Balance(Mandatory) New Balance Double

3.9.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

3.10 ChangeCredit
To change trader credit amount.

3.10.1 Inputs
SNo Name Desc Type

1 AccountNo(Mandatory) Trader loginId int

2 Credit(Mandatory) Credit amount Double

3 Expiry(Mandatory) Date Unix TimeStamp

3.10.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

User Manual for Web API


FxBrokerTools
1. "OK"

3.11 GetGroups
To get all groups of manager account.

3.11.1 Inputs
None.

e.g. "1,GetGroups,"

Here 1 is SERVERNAME.

3.11.2 Output
The output is in form of JSON format with following description.

Response JSON :

JSON NODE TYPE VALUE Description

TotalGroups Number Number of groups Total Number of


records in Groups
Array

msgtype Number 64 Message type


identification
number.

isLast Number 0 or 1 This response is Last


response if isLast is 1.

In case of isLast is 0,
there will be more
response still coming
from server.

Result Number 0,1,2,3,4,5,6,7 0 on success and non


zero on error.

Message String OK or Error Messages On success it contains


OK message, else it
will contain error
messages.

Groups Array Contains group


details.

Groups:

User Manual for Web API


FxBrokerTools
JSON NODE TYPE VALUE Description

credit Number Contains group credit

group String Size will be less Group name


than or equal to
16 character

default_leverage Number Contains group leverage

currency String Size will be less Account's currency


than or equal to
12 character

e.g.
{"Groups":[{"credit":0,"currency":"USD","default_leverage":100,"group":"TSTRADE1"},{"credit":0,"curre
ncy":"USD","default_leverage":100,"group":"TSTRADE2"},{"credit":0,"currency":"","default_leverage":0,
"group":"manager"}],"TotalGroups":3,"isLast":1,"message":"OK","msgtype":83,"result":0}

3.12 GetGroupRecord
To get group record of a trader.

3.12.1 Inputs
SNo Name Desc Type

1 GroupId(Mandatory) Trader GroupId string

e.g. "1,GetGroupRecord,TSTRADE2";

Here 1 is SERVERNAME, GetGroupRecord function and TSTRADE2 is group name.

3.12.2 Output
The output is in form of JSON format with following description.

Response JSON :

JSON NODE TYPE VALUE Description

TotalGroups Number Number of groups Total Number of


records in Groups
Array

msgtype Number 64 Message type


identification
number.

User Manual for Web API


FxBrokerTools
isLast Number 0 or 1 This response is Last
response if isLast is 1.

In case of isLast is 0,
there will be more
response still coming
from server.

Result Number 0,1,2,3,4,5,6,7 0 on success and non


zero on error.

Message String OK or Error Messages On success it contains


OK message, else it
will contain error
messages.

Groups Array Contains group


details.

Groups:

JSON NODE TYPE VALUE Description

credit Number Contains group credit

group String Size will be less Group name


than or equal to
16 character

default_leverage Number Contains group leverage

currency String Size will be less Account's currency


than or equal to
12 character

e.g.
{"Groups":[{"credit":0,"currency":"USD","default_leverage":100,"group":"TSTRADE1"},{"credit":0,"curre
ncy":"USD","default_leverage":100,"group":"TSTRADE2"},{"credit":0,"currency":"","default_leverage":0,
"group":"manager"}],"TotalGroups":3,"isLast":1,"message":"OK","msgtype":83,"result":0}

3.13 GetTradeHistory
To get history of trades of trader acoount.

3.13.1 Inputs
SNo Name Desc Type

User Manual for Web API


FxBrokerTools
1 AccountNo(Mandatory) Trader loginId int

2 FromTime Date Unix TimeStamp

3 TillTime Date Unix TimeStamp

3.13.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Common Error

And in case of successful operation, the output is

1. order
2. open_time
3. Open_price
4. close_time
5. close_price

3.14 GetJournal
To get journals of manager.

3.14.1 Inputs
SNo Name Desc Type

1 filter Type of journal string

e.g."Standard","Logins","Trades","Errors","Full",
"LiveUpdate","SendMail","Failover"
2 FromTime Date Unix TimeStamp

3 TillTime Date Unix TimeStamp

3.14.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Common Error

And in case of successful operation, the output is

1. code

User Manual for Web API


FxBrokerTools
2. ip
3. message
4. time
3.15 GetMarginInfo
To get margin information of group.

3.15.1 Inputs
SNo Name Desc Type

1 GroupId(Mandatory) Trader GroupId string

3.15.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Common Error

And in case of successful operation, the output is

1. margin_call
2. margin_mode
3. margin_stopout
4. margin_type
3.16 GetOpenOrders
To get all open trades of manager.

3.16.1 Inputs
None

3.16.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Common Error

And in case of successful operation, the output is

1. order
2. Login
3. Symbol
4. Digits
5. Cmd
6. Volume

User Manual for Web API


FxBrokerTools
7. State
8. Open_Price
9. Sl
10. Tp
11. Gw_volume
12. commission
13. commission_agent
14. storage
15. close_price
16. profit
17. taxes
18. magic
19. Comment
20. gw_order
21. activation
22. gw_open_price
23. gw_close_price
24. margin_rate
3.17 SymbolsGetAll
To get all symbols of manager.

3.17.1 Inputs
None

3.17.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Common Error

And in case of successful operation, the output is

1. Symbol
2. Description
3. source
4. currency
5. type
6. digits
7. trade
3.18 OpenOrder
To open a new market order by trader.

3.18.1 Inputs
SNo Name Desc Type

User Manual for Web API


FxBrokerTools
1 type(Mandatory) Trade transaction type. Enter 75 to UCHAR
open order.

2 reserved reserved char

3 Cmd (Mandatory) trade command BUY=0,SELL=1 short

4 order order int

5 orderby(LoginId) (Mandatory) order by Trader(LoginId) int

6 symbol (Mandatory) trade symbol string

7 volume (Mandatory) trade volume int

8 price (Mandatory) trade price double

9 sl (Mandatory) stoploss double

10 tp (Mandatory) takeprofit double

11 ie_deviation deviation on IE int

12 comment comment string

13 crc int

3.18.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "Order"

3.19 ModifyOrder
To modify an open order of trader.

3.19.1 Inputs
SNo Name Desc Type

User Manual for Web API


FxBrokerTools
1 Type trade transaction type. Enter 80 to UCHAR
modify order.

2 Reserved Reserved char

3 Cmd trade command BUY=0,SELL=1 short

4 order(Mandatory) Order int

5 orderby(LoginId) (Mandatory) order by Trader(LoginId) int

6 symbol trade symbol string

7 volume trade volume int

8 price(Mandatory) trade price double

9 sl (Mandatory) Stoploss double

10 tp (Mandatory) Takeprofit double

11 ie_deviation deviation on IE int

12 comment Comment string

13 crc int

3.19.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

3.20 OpenPendingOrder
To open a new pending order of trader.

3.20.1 Inputs
SNo Name Desc Type

User Manual for Web API


FxBrokerTools
1 type Trade transaction type . Enter 75 to open order. UCHAR

2 reserved reserved char

3 Cmd (Mandatory) trade command short


BUY_LIMIT=2,SELL_LIMIT=3BUY_STOP=4,SELL_STOP=5

4 order order int

5 orderby(LoginId) order by Trader(LoginId) int


(Mandatory)

6 symbol (Mandatory) trade symbol string

7 volume (Mandatory) trade volume int

8 price (Mandatory) trade price double

9 sl (Mandatory) stoploss double

10 tp (Mandatory) takeprofit double

11 ie_deviation deviation on IE int

12 comment comment string

13 expiration(Mandatory) pending order expiration time Unix timeStamp

14 crc int

3.20.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "Order"

3.21 ModifyPendingOrder
To modify an open pending order of trader.

User Manual for Web API


FxBrokerTools
3.21.1 Inputs
SNo Name Desc Type

1 type trade transaction type. Enter 80 to modify order. UCHAR

2 reserved reserved char

3 Cmd trade command short


BUY_LIMIT=2,SELL_LIMIT=3BUY_STOP=4,SELL_STOP=5

4 order(Mandatory) order int

5 orderby(LoginId) order by Trader(LoginId) int


(Mandatory)

6 Symbol trade symbol string

7 volume trade volume int

8 price (Mandatory) trade price double

9 sl (Mandatory) stoploss double

10 tp(Mandatory) takeprofit double

11 ie_deviation deviation on IE int

12 comment comment string

13 expiration(Mandatory) pending order expiration time Unix timeStamp

14 crc int

3.21.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

User Manual for Web API


FxBrokerTools
3.22 CloseOrder
To close an open order of trader.

3.22.1 Inputs
SNo Name Desc Type

1 type trade transaction type. Enter 80 to UCHAR


modify order.

2 reserved reserved char

3 Cmd trade command BUY=0,SELL=1 short

4 order(Mandatory) order int

5 orderby(LoginId) (Mandatory) order by Trader(LoginId) int

6 symbol trade symbol string

7 volume (Mandatory) trade volume int

8 price(Mandatory) trade price double

9 sl stoploss double

10 tp takeprofit double

11 ie_deviation deviation on IE int

12 comment comment string

13 crc int

3.22.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

User Manual for Web API


FxBrokerTools
3.23 DeleteOrder
To delete an open pending order of trader.

3.23.1 Inputs
SNo Name Desc Type

1 type trade transaction type. Enter 80 to UCHAR


modify order.

2 reserved reserved char

3 Cmd trade command BUY=0,SELL=1 short

4 order(Mandatory) order int

5 orderby(LoginId) (Mandatory) order by Trader(LoginId) int

6 symbol trade symbol string

7 volume (Mandatory) trade volume int

8 price(Mandatory) trade price double

9 sl stoploss double

10 tp takeprofit double

11 ie_deviation deviation on IE int

12 comment comment string

13 crc int

3.23.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

User Manual for Web API


FxBrokerTools
3.24 SendMail
Send mail to trader.

3.24.1 Inputs
SNo Name Desc Type

1 Receiver(LoginId) Receiver LoginId int

2 Sender (LoginId) Sender LoginId Int

3 Sender Name Sender Name string

4 Subject Mail Subject String

5 Body Message string

3.24.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

3.25 TransferBalance
To transfer balance from one trader account to another.

3.25.1 Inputs
SNo Name Desc Type

1 FromAccountNo(Mandatory) Trasfer balance from Trader(LoginId) int

2 toAccountNo. (Mandatory) balance to Trader(LoginId) int

3 Balance(Mandatory) Balance to transfer double

3.25.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

User Manual for Web API


FxBrokerTools
1. "OK/None"
2. "Invalid parameters",
3. "Network problem",
4. "Common Error

And in case of successful operation, the output is

1. "OK"

3.26 GetLeverageOfGroup
To get leverage of a group.

3.26.1 Inputs
SNo Name Desc Type

1 GroupId(Mandatory) Trader GroupId string

3.26.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Invalid Group"
3. "Common Error

And in case of successful operation, the output is

1. Leverage

3.27 GetAllLeverage
To get leverage of all groups

3.27.1 Inputs
None

3.27.2 Output
The output is in form of JSON format with following description.

In case of error, the output is

1. "Network problem",
2. "Invalid Group"
3. "Common Error

And in case of successful operation, the output is

User Manual for Web API


FxBrokerTools
1. Group

3.28 AccountHaveTrades
accountId,GroupName

4 Service Calls
GetAccounts(string tokenid, int managerId);

UriTemplate = "GetAccounts/{tokenid}/{managerId}"

Output: JSON message

CheckPassword(string tokenid, int managerId, int accountId, string password, string comment);

UriTemplate = " CheckPassword/{tokenid}/{managerId}/{accountId}/{password}/{comment}"

Output: JSON message

ChangePassword(string tokenid, int managerId, int accountId, string password, string newpassword);

UriTemplate = " ChangePassword/{tokenid}/{managerId}/{accountId}/{password}/{newpassword}""

Output: JSON message

GetAccountInfo(string tokenid, int managerId, int accountId);

UriTemplate = " GetAccountInfo/{tokenid}/{managerId}/{accountId}"

Output: JSON message

AuthenticateUser(string username, string password);

UriTemplate = " AuthenticateUser/{username}/{password}"

Output: JSON message

changeBalance(string tokenid, int managerId, int accountId, double balance, string comment);

UriTemplate = " changeBalance/{tokenid}/{managerId}/{accountId}/{balance}/{comment}"

Output: JSON message

ChangeCredit(string tokenid, int managerId, int accountId, double balance, string time, string
comment)

UriTemplate = " ChangeCredit/{tokenid}/{managerId}/{accountId}/{balance}/{time}/{comment}"

Output: JSON message

User Manual for Web API


FxBrokerTools
TransferBalance(string tokenid, int managerId, int fromaccountId, int ToaccountId, double balance,
string comment);

UriTemplate =
"TransferBalance/{tokenid}/{managerId}/{fromaccountId}/{ToaccountId}/{balance}/{comment}""

Output: JSON message

SymbolsGetAll(string tokenid, int managerId);

UriTemplate = " SymbolsGetAll/{tokenid}/{managerId}"

Output: JSON message

GetOpenedTradesForAccountId(string tokenid, int managerId, int accountId);

UriTemplate = " GetOpenedTradesForAccountId/{tokenid}/{managerId}/{accountId}"

Output: JSON message

GetOpenOrders(string tokenid, int managerId);

UriTemplate = " GetOpenOrders/{tokenid}/{managerId}"

Output: JSON message

GetTradeHistory(string tokenid, int managerId, int accountId, DateTime FromTime, DateTime


TillTime);

UriTemplate = " GetTradeHistory/{tokenid}/{managerId}/{accountId}/{FromTime}/{TillTime}"

Output: JSON message

AccountHaveTrades(string tokenid, int managerId, int accountId, DateTime FromTime, DateTime


TillTime);

UriTemplate = " AccountHaveTrades/{tokenid}/{managerId}/{accountId}/{FromTime}/{TillTime}"

Output: JSON message

UpdateLeverage(string tokenid, int managerId, int accountId, string leverage);

UriTemplate = "GetAccounts/{tokenid}/{managerId}"

Output: JSON message

GetGroupRecord(string tokenid, int managerId, string group);

UriTemplate = " GetGroupRecord/{tokenid}/{managerId}/{group}"

User Manual for Web API


FxBrokerTools
Output: JSON message

GetGroups(string tokenid, int managerId);

UriTemplate = " GetGroups/{tokenid}/{managerId}"

Output: JSON message

GetAccountBalance(string tokenid, int managerId, int accountId, string comment);

UriTemplate = " GetAccountBalance/{tokenid}/{managerId}/{accountId}/{comment}"

Output: JSON message

DeleteAccount(string tokenid, int managerId, int accountId, string comment);

UriTemplate = " DeleteAccount/{tokenid}/{managerId}/{accountId}/{comment}"

Output: JSON message

CreateAccount(string tokenid, int managerId, int login, string group, string password, int enable,

int enable_change_password, int enable_read_only,

string password_investor, string password_phone,

string name, string country, string city, string state,

string zipcode, string address, string phone, string email,

string comment, string id, string status, int leverage,

int agent_account, double balance, double prevmonthbalance,

double prevbalance, double credit, double interestrate,

double taxes, double prevmonthequity, double prevequity,

int publickey, int send_reports, uint mqid);

UriTemplate = "
CreateAccount/{tokenid}/{managerId}/{login}/{group}/"{password}/{enable}/{enable_change_password
}/{enable_read_only}/{password_investor}/{password_phone}/{name}/{country}/{city}/{state}/{zipcode}
/{address}/{phone}/{email}/{id}/{status}/{leverage}/{agent_account}/{balance}/{prevmonthbalance}/{pr
evbalance}/{credit}/{interestrate}}/{taxes}/{prevmonthequity}/{prevequity}/{publickey}/{send_reports}/
{mqid}"

Output: JSON message

User Manual for Web API


FxBrokerTools
ModifyAccount(string tokenid, int managerId, int login, string group, string password, int enable,

int enable_change_password, int enable_read_only,

string password_investor, string password_phone,

string name, string country, string city, string state,

string zipcode, string address, string phone, string email,

string comment, string id, string status, int leverage,

int agent_account, double balance, double prevmonthbalance,

double prevbalance, double credit, double interestrate,

double taxes, double prevmonthequity, double prevequity,

int publickey, int send_reports, uint mqid);

UriTemplate = "
ModifyAccount/{tokenid}/{managerId}/{login}/{group}/{password}/{enable}/{enable_change_password}
/{enable_read_only}/{password_investor}/{password_phone}/{name}/{country}/{city}/{state}/{zipcode}
/{address}/{phone}/{email}/{id}/{status}/{leverage}/{agent_account}/{balance}/{prevmonthbalance}/{pr
evbalance}/{credit}/{interestrate}}/{taxes}/{prevmonthequity}/{prevequity}/{publickey}/{send_reports}/
{mqid}"

Output: JSON message

OpenOrder(string tokenid, int managerId, char Type, char reserved, short cmd, int order, int LoginId,
string symbol, int volume, double tradeprice, double stoploss, double takeprofit, int deviation,
string comment, int crc);

UriTemplate = "
OpenOrder/{tokenid}/{managerId}/{Type}/{reserved}/{cmd}/{order}/{LoginId}/{symbol}/{volume}/{trade
price}/{stoploss}/{takeprofit}/{deviation}/{comment}/{crc}"

Output: JSON message

ModifyOrder(string tokenid, int managerId, char Type, char reserved, short cmd, int order, int LoginId,
string symbol, int volume, double tradeprice, double stoploss, double takeprofit, int deviation,
string comment, int crc);

UriTemplate = "
ModifyOrder/{tokenid}/{managerId}/{Type}/{reserved}/{cmd}/{order}/{LoginId}/{symbol}/{volume}/{tra
deprice}/{stoploss}/{takeprofit}/{deviation}/{comment}/{crc}"

Output: JSON message

User Manual for Web API


FxBrokerTools
OpenPendingOrder(string tokenid, int managerId, char Type, char reserved, short cmd, int order, int
LoginId, string symbol, int volume, double tradeprice, double stoploss, double takeprofit, int
deviation, string comment, string expiration, int crc);

UriTemplate =

OpenPendingOrder
/{tokenid}/{managerId}/{Type}/{reserved}/{cmd}/{order}/{LoginId}/{symbol}/{volume}/{tradeprice}/{sto
ploss}/{takeprofit}/{deviation}/{comment}}/{expiration}/{crc}"

Output: JSON message

ModifyPendingOrder (string tokenid, int managerId, char Type, char reserved, short cmd, int order, int
LoginId, string symbol, int volume, double tradeprice, double stoploss, double takeprofit, int
deviation, string comment, string expiration, int crc);

UriTemplate =

ModifyPendingOrder
/{tokenid}/{managerId}/{Type}/{reserved}/{cmd}/{order}/{LoginId}/{symbol}/{volume}/{tradeprice}/{sto
ploss}/{takeprofit}/{deviation}/{comment}}/{expiration}/{crc}"

Output: JSON message

CloseOrder (string tokenid, int managerId, char Type, char reserved, short cmd, int order, int LoginId,
string symbol, int volume, double tradeprice, double stoploss, double takeprofit, int deviation,
string comment, int crc);

UriTemplate = "
CloseOrder/{tokenid}/{managerId}/{Type}/{reserved}/{cmd}/{order}/{LoginId}/{symbol}/{volume}/{trade
price}/{stoploss}/{takeprofit}/{deviation}/{comment}/{crc}"

Output: JSON message

DeleteOrder (string tokenid, int managerId, char Type, char reserved, short cmd, int order, int LoginId,
string symbol, int volume, double tradeprice, double stoploss, double takeprofit, int deviation,
string comment, int crc);

UriTemplate = "
DeleteOrder/{tokenid}/{managerId}/{Type}/{reserved}/{cmd}/{order}/{LoginId}/{symbol}/{volume}/{trad
eprice}/{stoploss}/{takeprofit}/{deviation}/{comment}/{crc}"

Output: JSON message

User Manual for Web API


FxBrokerTools

Вам также может понравиться