Home Features Markets Blog
Help & FAQ Contact
 
Telegram icon Twitter icon Facebook icon

API Documentation - Version 2.3

Basics

User

Quota

Order

Position

Market

Social

Copy Trader



Basics

HTTPS

Our trading API is based on simple HTTPS GET requests. We do not accept requests over the unencrypted HTTP protocol. Data is returned as a JSON encoded object. Virtually all programming environments offer the required libraries to access our HTTPS API. Currently you can:
  • Get basic account data
  • Create/cancel and list open orders
  • Edit/close and list open positions
  • List position/transaction history
  • Get market data

Authentication

All API requests require authentication with an API token. You can generate up to 5 API tokens in your account settings. An API token consists of 32 random characters (letters and numbers).

Base URL

https://1broker.io/api/v2/


Example Request

https://1broker.io/api/v2/type/method.php?&pretty=1&token=%APITOKEN%
	&parameter1=123
	&parameter2=false


Example JSON Response

{
	"server_time": "2014-11-06T10:34:47.123Z",
	"error": false,
	"warning": false,
	//Response Object for the API request
	"response": {
		...
	}
}


Errors and Warnings

Each request comes with an "error" and "warning" field (boolean). Always check against the "error" field to see if the API request was successful. Make sure to log or display warnings and errors in your application. (e.g. API deprecation warning)

If an error occurs, an "error_code" is returned. Some errors also include an error_data object with additional information.
For warnings, a "_message" post-fixed field exists, which contains a description of the problem.

Example Warning

{
	"server_time": "2016-11-04T10:12:27.631Z",
	"error": false,
	"warning": true,
	"warning_message": "API version 1 is deprecated and will be disabled on January 9th, 2017. Please switch to version 2 and create a new API token.",
	//Response Object for API request
	"response": {
		...
	}
}

Example Error

{
	"server_time": "2016-11-04T10:12:27.631Z",
	"error": true,
	"response": null,
	"error_code": "TRADE_MARGIN_TOO_LOW",
	"error_data": {
		"margin": "0.001",
		"currency": "BTC"
	}
	"warning": false,
	"response": null
}


Data types

Numeric Types

All integer and float values are returned as quoted strings. This makes sure that no precision is lost across platforms.
"1000315", "102.65557", "-10.98765"

Bitcoin Amounts

Warning: Using 32 bit integers/floats will lead to errors in your application. More information
Bitcoin amounts are returned as strings (see above) and in Bitcoin (1 Bitcoin = 100,000,000 satoshis). (List of Bitcoin Units) Internally we use integer representation for all amounts, so you can safely multiply amounts by 100.000.000 (1e8) and will always receive a valid (64-bit) integer.
"1", "0.01", "-3.56216842"

Timestamps

Timestamps are returned as ISO 8601 strings with up to millisecond precision. Most modern languages and libraries will handle these without any issues.
The letter 'T' is a separator between the date and time. The letter 'Z' at the end indicates that the timestamp is, like all returned timestamps, in UTC time.
"server_time": "2014-11-06T10:34:47.123Z"


Paging

Certain API requests like logs have too many elements to request them all at once. Across our API, paging works with a limit and an offset parameter. Here is an example of how to use them:
1st page limit 10, offset 0
2nd page limit 10, offset 10
3rd page limit 10, offset 20
...
n-th page limit 10, offset 10*(n-1)

Example API request with offset 20 and limit 10:

https://1broker.io/api/v2/type/method.php
?token=%APITOKEN%
&offset=20
&limit=10

Response

The response object contains the requested elements for the current page.

Deprecation policy

If an API version is deprecated, a warning message is appended to every response. (see example above) We will support deprecated APIs for at least two months after a new API version is available. In order to get informed about a deprecated API version in time, please log or display warning messages in your application

SSL certificate verification

We strongly recommend that all API requests validate the SSL certificate presented to prevent MITM attacks. Usually this is turned on by default in most libraries, but if you see a setting to 'verify SSL' you should always ensure it is set to 'true'.

IP Restriction

If you make API requests via a static IP address, make sure to enable an IP restriction when generating the API token for security reasons.

Pretty Printing

By appending ...&pretty=1 to a request the response becomes easier readable for humans. In production you should disable this option to save bandwidth and increase parsing times.

Monetizing your software

Monetizing trading software, that was built for other traders on top of our API, can be done in various ways and there are no specific restrictions. However, we strongly recommend to use the possibility of overwriting the trader's referral_id in the order/create method. Per the terms of our referral program, you will receive a profit share once the order gets executed. You can read more about our referral program in the trading panel (login required).

Quotas

In order to keep our API responsive for all traders, we're using an IP address based quota system. The API is rate limited by a CPU allowance, rather than a fixed number of calls per time window. Some API requests take longer to fetch than others, so these cost more allowance. Currently, each client has an allowance of 120000 ms (120 seconds) of CPU time per hour. Once that quota is reached no further requests are possible until the start of the next hour.
You can check your remaining quota by calling quota/status.

Execution Time

By appending ...&execution_time=1 to a request the response will include the execution time for the API call. You can estimate the cpu time/hour cost of your application that way and stay within the quota limits. In production you should disable this option to save bandwidth and increase parsing times.

Example Response

{
	...,
	"execution_time_milliseconds": 2
}


User

user/details

Description

Returns basic user data.

Parameters

None

Example Request

https://1broker.io/api/v2/user/details.php
?token=YOUR_API_TOKEN
&pretty=true

Example Response

{
	...
	"response": {
	    "username": "example_user",
	    "email": "[email protected]",
	    "balance": "9.1636",
	    "pending_deposits": "0.0123",
	    "date_created": "2014-11-06T10:34:47Z"
	}
}

user/overview

Description

Overview of balance, positions and orders.

Parameters

None

Example Request

https://1broker.io/api/v2/user/overview.php
?token=YOUR_API_TOKEN
&pretty=true

Example Response

{
	...
	"response": {
	    "username": "example_user",
	    "email": "[email protected]",
	    "balance": "9.1636",
	    "date_created": "2014-11-06T10:34:47Z",
	    "orders_worth": "405",
	    "positions_worth": "424.5548",
	    "net_worth": "2738.7184",
	    "orders_open": [
	        {
	            "order_id": "1650",
	            "symbol": "EURUSD",
	            "margin": "1",
	            "leverage": "200",
	            "direction": "short",
	            "order_type": "Market",
	            "order_type_parameter": "-1",
	            "stop_loss": "0",
	            "take_profit": "0",
	            "shared": true,
	            "date_created": "2016-11-03T15:40:53Z"
	        }
	    ],
	    "positions_open": [
	        {
	            "position_id": "16993",
	            "order_id": "456",
	            "symbol": "DOW",
	            "margin": "1",
	            "leverage": "1",
	            "direction": "long",
	            "entry_price": "18209.40514339",
	            "profit_loss": "-0.0336556",
	            "profit_loss_percent": "-3.37",
	            "value": "0.9663444",
	            "market_close": false,
	            "stop_loss": "0",
	            "take_profit": null,
	            "trailing_stop_loss": false,
	            "shared": true,
	            "copy_of": null,
	            "date_created": "2016-10-24T07:16:55Z"
	        }
	    ]
	}
}

user/deposit

Description

Returns your deposit addresses and pending deposits.

Parameters

None

Example Request

https://1broker.io/api/v2/user/deposit.php
?token=YOUR_API_TOKEN
&pretty=true

Example Response

{
	...
	"response": {
	    "addresses": [
	        {
	            "address": "35bJQh6SGnbZ2q93kkzAwjYDT5jp6fubK3",
	            "date": "2018-05-10T10:58:59Z"
	        }
	    ],
	    "two_factor_authentication_enabled": true,
	    "pending_deposits": {
	        "date": "2018-06-14T12:32:36Z",
	        "amount": "0.1234"
	    }
	}
}

user/transactions

Description

Returns the list of transactions.

Parameters

limit limit (optional) Maximum amount of entries per page. Default: 10
offset offset (optional) Offset of how many entries to skip. Default: 0
type string (optional) Filter transactions by type. Default: ALL
date_start date string (ISO8601) (optional) Start date (Default: earliest date).
date_end date string (ISO8601) (optional) End date (Default: current date).

Example Request

https://1broker.io/api/v2/user/transactions.php
?token=YOUR_API_TOKEN
&pretty=true
&limit=10
&offset=0
&type=ALL
&date_start=2017-11-02T12:00:00Z
&date_end=2018-11-02T13:30:00Z

Example Response

{
	...
	"response": [
	    {
	        "transaction_id": "72",
	        "date": "2018-06-19T11:05:15.716187Z",
	        "type": "ORDER_CREATE",
	        "amount": "-0.00099998",
	        "balance_new": "4.39939469",
	        "payload": {
	            "order_id": "66666",
	            "symbol": "EURUSD",
	            "order_type": "Market"
	        }
	    }
	]
}


Quota

quota/status

Description

Returns the remaining and total CPU allowance time in milliseconds.

Parameters

None

Example Request

https://1broker.io/api/v2/quota/status.php
?pretty=true

Example Response

{
	...
	"response": {
	    "cpu_time_left": "119997",
	    "cpu_time_left_percentage": "99.998",
	    "cpu_time_total": "120000"
	}
}


Order

order/open

Description

Returns the list of open orders.

Parameters

None

Example Request

https://1broker.io/api/v2/order/open.php
?token=YOUR_API_TOKEN
&pretty=true

Example Response

{
	...
	"response": [
	    {
	        "order_id": "121532",
	        "symbol": "EURUSD",
	        "margin": "0.5",
	        "leverage": "75",
	        "direction": "long",
	        "order_type": "market",
	        "order_type_parameter": "-1",
	        "stop_loss": "1.1005",
	        "take_profit": "1.2000",
	        "shared": false,
	        "date_created": "2015-05-27T16:09:27Z"
	    }
	]
}

order/create

Description

Creates a new order and returns it.

Parameters

symbol string Market symbol.
margin float Margin (also called "amount" in the user interface) of the order. Amount you want to invest.
direction string Direction of the order - either "long" or "short".
leverage positive integer Value denoting the leverage used for this order.
order_type string Type of the order - either market ("market"), limit ("limit") or stop entry ("stop_entry").
order_type_parameter float Parameter for the specified ordertype. Not required for "Market" orders.
stop_loss float (optional) Stop loss limit for the order, once it has been opened.
take_profit float (optional) Take profit price for the order, once it has been opened.
referral_id string (optional) You can override the user's referral_id with this parameter. Only applies for this order/position. An account cannot refer itself.
shared boolean (optional) Indicates whether or not the trade will be visible to other traders.

Example Request

https://1broker.io/api/v2/order/create.php
?token=YOUR_API_TOKEN
&pretty=true
&symbol=GOLD
&margin=0.25
&direction=long
&leverage=3
&order_type=limit
&order_type_parameter=950
&referral_id=1337
&shared=true

Example Response

{
	...
	"response": {
	    "order_id": "1658",
	    "symbol": "GOLD",
	    "margin": "0.25",
	    "leverage": "3",
	    "direction": "long",
	    "order_type": "limit",
	    "order_type_parameter": "950",
	    "stop_loss": null,
	    "take_profit": null,
	    "shared": true,
	    "date_created": "2016-11-07T13:44:32Z"
	}
}

order/cancel

Description

Cancels an open order. Returns null when successful.

Parameters

order_id positive integer ID of the order to close.

Example Request

https://1broker.io/api/v2/order/cancel.php
?token=YOUR_API_TOKEN
&pretty=true
&order_id=18947

Example Response

{
	...
	"response": null
}


Position

position/open

Description

Returns the list of open positions.

Parameters

None

Example Request

https://1broker.io/api/v2/position/open.php
?token=YOUR_API_TOKEN
&pretty=true

Example Response

{
	...
	"response": [
	    {
	        "position_id": "16993",
	        "order_id": "456",
	        "symbol": "DOW",
	        "margin": "1",
	        "leverage": "1",
	        "direction": "long",
	        "entry_price": "18209.40514339",
	        "profit_loss": "-0.0336556",
	        "profit_loss_percent": "-3.37",
	        "value": "0.9663444",
	        "market_close": false,
	        "stop_loss": "0",
	        "take_profit": null,
	        "trailing_stop_loss": false,
	        "shared": false,
	        "copy_of": null,
	        "date_created": "2016-10-24T07:16:55Z"
	    }
	]
}

position/history

Description

Returns the details of the closed positions.

Parameters

limit limit (optional) Maximum amount of entries per page. Default: 10
offset offset (optional) Offset of how many entries to skip. Default: 0
date_start date string (ISO8601) (optional) Start date (Default: earliest date).
date_end date string (ISO8601) (optional) End date (Default: current date).

Example Request

https://1broker.io/api/v2/position/history.php
?token=YOUR_API_TOKEN
&pretty=true
&limit=10
&offset=0

Example Response

{
	...
	"response": [
	    {
	        "position_id": "16073",
	        "order_id": "375",
	        "symbol": "USDCAD",
	        "margin": "2",
	        "leverage": "1",
	        "direction": "short",
	        "entry_price": "1.31342",
	        "exit_price": "1.49269",
	        "profit_loss": "-0.27298199",
	        "profit_loss_percent": "-13.65",
	        "value": "1.72701801",
	        "stop_loss": "2.600572",
	        "take_profit": null,
	        "shared": false,
	        "copy_of": null,
	        "date_created": "2016-10-24T07:16:53Z",
	        "date_closed": "2016-11-02T09:20:46Z"
	    }
	]
}

position/edit

Description

You can edit the stop loss and/or take profit values of a position with this API call.
Returns the details of your changes.

Parameters

position_id positive integer ID of the desired position.
stop_loss float (optional) New stop loss value (Default: stays untouched). Refer to to order/create for detailed information.
take_profit float (optional) New stop loss value (Default: stays untouched). Refer to to order/create for detailed information.
trailing_stop_loss boolean (optional) Stop Loss will be set to trail the price (at the current distance) if true.

Example Request

https://1broker.io/api/v2/position/edit.php
?token=YOUR_API_TOKEN
&pretty=true
&position_id=1031546
&stop_loss=932
&take_profit=1000
&trailing_stop_loss=true

Example Response

{
	...
	"response": {
	    "position_id": "1031546",
	    "stop_loss": "932",
	    "take_profit": "1000",
	    "trailing_stop_loss": true
	}
}

position/close

Description

Sets the market_close flag of the position to true and thereby marks it for closure at the earliest possible time.

Parameters

position_id positive integer ID of the desired position.

Example Request

https://1broker.io/api/v2/position/close.php
?token=YOUR_API_TOKEN
&pretty=true
&position_id=4613

Example Response

{
	...
	"response": null
}

position/close_cancel

Description

You can cancel the closure of a position with this call if the position is still open.

Parameters

position_id positive integer ID of the desired position.

Example Request

https://1broker.io/api/v2/position/close_cancel.php
?token=YOUR_API_TOKEN
&pretty=true
&position_id=4613

Example Response

{
	...
	"response": null
}

position/get

Description

Returns the details of a single position. The position can be open or closed.

Parameters

position_id positive integer ID of the desired position.

Example Request

https://1broker.io/api/v2/position/get.php
?token=YOUR_API_TOKEN
&pretty=true
&position_id=1234567

Example Response

{
	...
	"response": {
	    "position_id": "1234567",
	    "order_id": "7654321",
	    "symbol": "EURUSD",
	    "margin": "1",
	    "leverage": "10",
	    "direction": "long",
	    "entry_price": "1.11103",
	    "exit_price": "1.10982",
	    "profit_loss": "-0.0108908",
	    "profit_loss_percent": "-1.09",
	    "value": "0.9891092",
	    "stop_loss": "1.01993",
	    "take_profit": null,
	    "trailing_stop_loss": false,
	    "is_open": false,
	    "date_created": "2018-03-28T13:58:39Z",
	    "date_closed": "2018-04-28T15:00:41Z",
	    "shared": false,
	    "copy_of": null
	}
}

position/shared/get

Description

Returns the details and comments of a shared position.

Parameters

position_id positive integer ID of the desired position.

Example Request

https://1broker.io/api/v2/position/shared/get.php
?token=YOUR_API_TOKEN
&pretty=true
&position_id=666

Example Response

{
	...
	"response": {
	    "symbol": "AAPL",
	    "direction": "long",
	    "position_id": "666",
	    "username": "Patrick",
	    "profile_image_url": "https://...",
	    "user_id": "1",
	    "leverage": "5",
	    "date_created": "2017-04-06T08:05:53Z",
	    "entry_price": "1000.22496",
	    "is_open": true,
	    "date_closed": null,
	    "exit_price": null,
	    "profit_loss_percent": "98.79",
	    "stop_loss": "862.2629",
	    "take_profit": null,
	    "trailing_stop_loss": false,
	    "comments": [
	        {
	            "comment_id": 1,
	            "user_id": 1,
	            "username": "Patrick",
	            "content": "First public trade!",
	            "upvotes": 0,
	            "downvotes": 0,
	            "deleted_by": null,
	            "profile_image_url": "https://...",
	            "deletable": true
	        }
	    ]
	}
}


Market

market/categories

Description

Returns a list of all available market categories.

Parameters

None

Example Request

https://1broker.io/api/v2/market/categories.php
?token=YOUR_API_TOKEN
&pretty=true

Example Response

{
	...
	"response": [
	    "INDEX",
	    "STOCK",
	    "COMMODITY",
	    "FOREX",
	    "CRYPTO"
	]
}

market/list

Description

Returns the list of available markets.

Parameters

category string Category for which markets should be listed.

Example Request

https://1broker.io/api/v2/market/list.php
?token=YOUR_API_TOKEN
&pretty=true
&category=forex

Example Response

{
	...
	"response": [
	    {
	        "symbol": "AUDNZD",
	        "name": "AUD/NZD",
	        "category": "FOREX",
	        "type": "CFD"
	    }
	]
}

market/details

Description

Returns detailed information of the market.

Parameters

symbol string Market symbol.

Example Request

https://1broker.io/api/v2/market/details.php
?token=YOUR_API_TOKEN
&pretty=true
&symbol=GOLD

Example Response

{
	...
	"response": {
	    "symbol": "GOLD",
	    "name": "Gold 1 oz",
	    "description": "Gold has been a valuable and highly sought-after...",
	    "category": "COMMODITY",
	    "type": "CFD",
	    "maximum_leverage": "100",
	    "maximum_amount": "500",
	    "overnight_charge_long_percent": "0.0204",
	    "overnight_charge_short_percent": "0.0077",
	    "decimals": "2",
	    "market_hours": {
	        "timezone": "America/New_York",
	        "open": "Sunday 18:00:00",
	        "close": "Friday 17:00:00",
	        "daily_break_start": "17:00:00",
	        "daily_break_stop": "18:00:00"
	    }
	}
}

market/quotes

Description

Returns a list of price tickers containing the bid/ask price and the timestamp of the last update.

Parameters

symbols string List of symbols separated by a comma.

Example Request

https://1broker.io/api/v2/market/quotes.php
?token=YOUR_API_TOKEN
&pretty=true
&symbols=EURUSD,GOLD

Example Response

{
	...
	"response": [
	    {
	        "symbol": "EURUSD",
	        "bid": "1.19588258",
	        "ask": "1.19598258",
	        "updated": "2016-11-02T11:19:00Z"
	    },
	    {
	        "symbol": "GOLD",
	        "bid": "1358.31771784",
	        "ask": "1358.91771784",
	        "updated": "2016-11-07T13:36:35Z"
	    }
	]
}

market/bars

Description

Returns an array of historic market data tuples in the Open, High, Low, Close format. The "date" field is the beginning of the OHLC interval. Old historical data will be removed for performance reasons.

Parameters

symbol string Market symbol.
resolution positive integer Resolution for OHLC market data (in seconds). (60, 900, 3600 or 86400)
date_start date string (ISO8601) (optional) Start date of the returned OHLC interval (Default: earliest date).
date_end date string (ISO8601) (optional) End date of the returned OHLC interval (Default: current date).
limit positive integer (optional) Limits the number of returned data points (Default: no limit).

Example Request

https://1broker.io/api/v2/market/bars.php
?token=YOUR_API_TOKEN
&pretty=true
&symbol=GOLD
&resolution=60
&date_start=2016-10-30T12:00:00Z
&date_end=2016-11-02T12:00:00Z

Example Response

{
	...
	"response": [
	    {
	        "date": "2016-11-02T10:28:00Z",
	        "o": "1235.142561",
	        "h": "1238.721443",
	        "l": "1203.329001",
	        "c": "1224.582498"
	    }
	]
}

market/ticks

Description

Returns a list of historic price ticks including date, price and spread.

Parameters

symbol string Market symbol.
limit positive integer (optional) Limits the number of returned data points (Default: 100).

Example Request

https://1broker.io/api/v2/market/ticks.php
?token=YOUR_API_TOKEN
&pretty=true
&symbol=GOLD

Example Response

{
	...
	"response": [
	    {
	        "date": "2016-12-16T09:36:49Z",
	        "price": "1282.31",
	        "spread": "0.6"
	    },
	    {
	        "date": "2016-12-16T09:36:55Z",
	        "price": "1282.20",
	        "spread": "0.6"
	    }
	]
}


Social

social/profile_statistics

Description

Returns the trading statistics for this user (if the profile is not set to private).

Parameters

user_id positive integer Valid user_id.

Example Request

https://1broker.io/api/v2/social/profile_statistics.php
?token=YOUR_API_TOKEN
&pretty=true
&user_id=1

Example Response

{
	...
	"response": {
	    "user_id": "1",
	    "username": "Patrick",
	    "profile_image_url": "https://...",
	    "date_created": "2012-11-08T08:05:44Z",
	    "profile_about_me_html": "<a href=\"http://lmgtfy.com\" target=\"_blank\">http://lmgtfy.com</a>",
	    "profile_about_me_raw": "http://lmgtfy.com",
	    "own_profile_hidden": false,
	    "risk_score": "1",
	    "maximum_profit_this_month": "0.13",
	    "maximum_loss_this_month": "-0.26",
	    "copy_trade_reward_total": "1.337",
	    "copier_count": "420",
	    "copy_margin_per_trade": "3.50",
	    "performance": [
	        [
	            "2016-05-01T00:00:00Z",
	            "-77.2"
	        ]
	    ],
	    "copier_count_history": [
	        [
	            "2016-04-21T00:00:00Z",
	            "2"
	        ]
	    ],
	    "date_cached": "2017-04-21T09:23:13.221Z",
	    "average_holding_time_seconds": "1944002",
	    "trades_last_7_days": "0",
	    "trades_last_12_months": "6",
	    "market_category_share": {
	        "CRYPTO": "33.33",
	        "INDEX": "16.66",
	        "STOCK": "16.66",
	        "COMMODITY": "16.66",
	        "FOREX": "16.66"
	    }
	}
}

social/profile_trades

Description

Returns a list of open and historic public trades.

Parameters

user_id positive integer Valid user_id.
limit limit (optional) Maximum amount of entries per page. Default: 20
offset offset (optional) Offset of how many entries to skip. Default: 0

Example Request

https://1broker.io/api/v2/social/profile_trades.php
?token=YOUR_API_TOKEN
&pretty=true
&user_id=1
&limit=10
&offset=0

Example Response

{
	...
	"response": {
	    "user_id": "1",
	    "username": "Patrick",
	    "profile_image_url": "https://...",
	    "date_created": "2012-11-08T08:05:44Z",
	    "profile_about_me_html": "<a href=\"http://lmgtfy.com\" target=\"_blank\">http://lmgtfy.com</a>",
	    "profile_about_me_raw": "http://lmgtfy.com",
	    "own_profile_hidden": false,
	    "risk_score": "1",
	    "maximum_profit_this_month": "0.13",
	    "maximum_loss_this_month": "-0.26",
	    "trading_ideas_open": [
	        {
	            "position_id": "6",
	            "symbol": "AAPL",
	            "leverage": "5",
	            "profit_loss_percent": "98.79",
	            "comment_count": "8",
	            "direction": "long",
	            "date_created": "2017-04-03T00:13:37Z",
	            "is_open": true,
	            "date_closed": null
	        }
	    ],
	    "trading_ideas_closed": [
	        {
	            "position_id": "8",
	            "symbol": "AAPL",
	            "leverage": "5",
	            "profit_loss_percent": "-0.62",
	            "comment_count": "3",
	            "direction": "short",
	            "date_created": "2017-04-01T04:20:00Z",
	            "is_open": false,
	            "date_closed": "2017-04-06T09:00:00Z"
	        }
	    ]
	}
}


Copy Trader

copy_trader/create

Description

Starts copying a trader.

Parameters

user_id positive integer Valid user_id.
margin_per_trade positive number Margin per copied trade.
limit_trades_daily positive integer Maximum amount of copies per day.

Example Request

https://1broker.io/api/v2/copy_trader/create.php
?token=YOUR_API_TOKEN
&pretty=true
&user_id=1
&margin_per_trade=0.25
&limit_trades_daily=25

Example Response

{
	...
	"response": null
}

copy_trader/edit

Description

You can edit your copy parameters with this API call.

Parameters

user_id positive integer Valid user_id.
margin_per_trade positive number Margin per copied trade.
limit_trades_daily positive integer Maximum amount of copies per day.

Example Request

https://1broker.io/api/v2/copy_trader/edit.php
?token=YOUR_API_TOKEN
&pretty=true
&user_id=1
&margin_per_trade=0.33
&limit_trades_daily=10

Example Response

{
	...
	"response": null
}

copy_trader/delete

Description

Stops copying a trader.

Parameters

user_id positive integer Valid user_id.

Example Request

https://1broker.io/api/v2/copy_trader/delete.php
?token=YOUR_API_TOKEN
&pretty=true
&user_id=1

Example Response

{
	...
	"response": null
}

copy_trader/list

Description

Returns the list of copied traders.

Parameters

None

Example Request

https://1broker.io/api/v2/copy_trader/list.php
?token=YOUR_API_TOKEN
&pretty=true

Example Response

{
	...
	"response": [
	    {
	        "user_id_copied": "1234",
	        "username_copied": "Snortex",
	        "margin_per_trade": "0.1",
	        "limit_trades_daily": "50",
	        "limit_trades_used": "0",
	        "date_created": "2018-07-12T09:24:39Z",
	        "profile_image_url": "https://..."
	    }
	]
}

What are you waiting for?

Trading Panel

Take us with you

Get it on
Google Play