Skip to main content

Trade Drafts

Trade Drafts enable automated generation of trade suggestions, for example via a bot. Only a few clicks are then required to actually execute the trade. The path to trading is thus much faster and more convenient than with manual input. At the same time, you retain full control over your trades.

Usage / License​

The use of Trade Drafts is free of charge for private users.

Preparation / Token Generation​

You use Trade Drafts with an anonymous trading account. You can create one at app.brokerize.com directly on the start page:

01-login.png

Then click on "New here". Now create a recovery phrase:

app.brokerize.com/user/recovery-phrase

With the generated phrase you can access your portfolio data and Trade Drafts at any time via "Trading -> Log in again" on the start page.

Broker Login​

Click on "Overview" at the top and log in with one or more brokers of your choice. You can then view your portfolios in the brokerize interface and also place, modify and cancel orders.

API Access Token​

To use the API programmatically for creating Trade Drafts, an access token can now be created.

To do so, open this URL in the browser tab from the first step:

app.brokerize.com/user/access-tokens

Click on "Create token" to define the access rights for the token. The simplest option is to create a token with read permission for all portfolios and a permission for Trade Drafts:

02-access-token.png

(If you have logged in with a broker beforehand, you can create an access token for selected portfolios only.)

After creating the token, a notice with the generated token is displayed. Please copy this token as it will not be visible later. However, you can create a new token at any time if you have lost the old token or it has expired.

Trade Drafts can be created via our API. The underlying format of TradeDraftOrderCreate is described in our official API documentation.

Example Requests​

You can perform these requests with an HTTP client of your choice. As an example we use curl on the command line here and assume that the access token you just created is available as an environment variable:

export BROKERIZETOKEN=brk_....

Retrieving the available exchanges (ExchangeIds)​

curl https://api.brokerize.com/exchanges -H "Authorization: Bearer $BROKERIZETOKEN"

Retrieving the portfolios readable with the token​

curl https://api.brokerize.com/portfolios -H "Authorization: Bearer $BROKERIZETOKEN"

Creating a Trade Draft​

In this example, a buy order ("direction": "buy") in the portfolio <PORTFOLIO_ID> (you can find out the ID of your portfolio via the /portfolios endpoint) is created as a Trade Draft. With "orderModel":"market" the execution type "Market" is selected and with "size":42 the quantity 42 is specified. The exchangeId: 4 (XETRA) was determined from the /exchanges endpoint. Apple ("US0378331005") is chosen as the security ISIN:

curl -X POST "https://api.brokerize.com/tradeDrafts" -H "Content-Type: application/json" -H "Authorization: Bearer $BROKERIZETOKEN" --data '{
"orderData": {
"portfolioId": "<PORTFOLIO_ID>",
"orderModel": "market",
"validity": {
"type": "GFD"
},
"size": 42,
"direction": "buy",
"exchangeId": 4,
"security": {
"name": "Apple",
"selector": {
"isin": "US0378331005"
}
}
},
"description": "Suggestion to order 42 shares of Apple"
}'

The ID of the Trade Draft is returned as the result:

{"id":"MEJ39qlE0WrV9u1K"}

The trade draft can now be seen in the table in the browser:

app.brokerize.com/tradeDrafts

03-open-tradedraft.png

Clicking on "Open order" transfers the desired parameters into the order form, and after your review the order can be placed with the broker:

04-tradedraft.png