# Welcome to Finery Markets

Finery Markets is the first global crypto-native Multi-Dealer Platform. Serving clients since 2019. Finery Markets provides Financial Institutions & Crypto-related Businesses with:

* Proprietary matching engine for best liquidity & execution quality
* Access to global Liquidity Providers / OTC desks via single API & GUI
* Robust infrastructure: full automation & 99.99+% uptime
* Flexible settlement & cash management due to the non-custodial model

## Platform overview and trading rules

{% content-ref url="/pages/HpGwDuKs1hHkDWTH8vN9" %}
[About Our Products](/overview/about-our-products)
{% endcontent-ref %}

## Getting started? Learn how to make your first trade

Review this chapter for an easy start. Set your limits and you will be good to make the first trade.

{% content-ref url="/pages/UO2hdwUGgXhb7kkaEiCn" %}
[Risk Management](/product-features/risk-management)
{% endcontent-ref %}

## Want to deep dive?

Dive a little deeper and start exploring our API reference to get an idea of everything that's possible with the API:

{% content-ref url="/pages/xIXEM5rN7LGhOVn4clSM" %}
[Quick Start with API](/api-reference/quick-start-with-api)
{% endcontent-ref %}

{% content-ref url="/pages/iJNZHgFbyTVwmiPm5evv" %}
[Data Types](/api-reference/data-types)
{% endcontent-ref %}

{% content-ref url="/pages/monOFmdwJJsTpOa1vEN8" %}
[List of Error Codes](/api-reference/troubleshooting-errors/list-of-error-codes)
{% endcontent-ref %}

{% content-ref url="/pages/S5OvP6SpppZIcjOPueec" %}
[REST API](/api-reference/rest-api)
{% endcontent-ref %}

{% content-ref url="/pages/QvJ4k173dMHzqv6imEQe" %}
[Websocket API](/api-reference/websocket-api)
{% endcontent-ref %}

{% content-ref url="/pages/hn4C2AWj46KVTdxNuZpY" %}
[Troubleshooting Errors](/api-reference/troubleshooting-errors)
{% endcontent-ref %}


# About Our Products

Multi-dealer marketplace for businesses in crypto.&#x20;

<table data-view="cards"><thead><tr><th></th><th data-hidden></th><th data-hidden></th></tr></thead><tbody><tr><td>Trade with no "last look" with our <a href="/pages/tELomoZOam98gfJvkt3i">Firm Order Book</a></td><td></td><td></td></tr><tr><td>Add non-firm liquidity using <a href="/pages/JJo3kE803kIB58DF8zeE">Quote Streams</a></td><td></td><td></td></tr><tr><td>Improve the spread and the total cost of execution with our <a href="/pages/GR2TCmxSsXbzHWiAvWfc">Aggregated Order Book</a></td><td></td><td></td></tr><tr><td>Automate your counterparty relationships, and reduce risk, all on one screen with our <a href="/pages/UO2hdwUGgXhb7kkaEiCn">Risk Management </a></td><td></td><td></td></tr><tr><td>Streamline position management with our <a href="/pages/ZUQoVImm7uH6Fljm2jUL">Position Management</a></td><td></td><td></td></tr><tr><td>Trade now, settle later with <a href="/pages/kLw0zWuf5U8hRSuG24ad">Non-deliverable tradi</a><a href="/pages/kLw0zWuf5U8hRSuG24ad">ng</a></td><td></td><td></td></tr><tr><td>Assign roles to your employees and control access to parts of the system with <a href="/pages/bCr2lzH91zekhXi7Ys1p">Multi-Roles</a></td><td></td><td></td></tr><tr><td>Stay in touch with your account activity with our <a href="/pages/sYQkhn7pDO2JPZ5iF738">Notification System</a></td><td></td><td></td></tr><tr><td>Personalize the price stream per taker with our <a href="/pages/FvMDpi22gHouGghszym1">Markups</a></td><td></td><td></td></tr><tr><td>Automate your post-trade settlements with our <a href="/pages/PK9YEwI2eRuMKSnzyA29">API</a></td><td></td><td></td></tr><tr><td><a href="/pages/3oYhEb2SLrlHSh5ukxqv">One report </a>that will answer all of the bank's and regulator's questions  </td><td></td><td></td></tr><tr><td>Defend against <a href="/pages/btvRF9AZtTE1DlsFMZtE">Toxic flow</a> with our speed bump </td><td></td><td></td></tr><tr><td>Make data-driven decisions about your trading costs and the activity of your customers with <a href="/pages/GAHb8lnSviyuEglWojXR">Pulse</a></td><td></td><td></td></tr></tbody></table>

## Trading <a href="#trading" id="trading"></a>

### What do I need to start trading? <a href="#what-do-i-need-to-start-trading" id="what-do-i-need-to-start-trading"></a>

You need to get access to the production environment [trade.finerymarkets.com](https://trade.finerymarkets.com/) and have the trading limits set.

### How can I make a trade? <a href="#how-can-i-make-a-trade" id="how-can-i-make-a-trade"></a>

You can do it either in GUI or via API. In GUI, open Trading tab where you can see a tradable order book, an order input form and last trades. Choose an asset and then specify price for limit orders, size, side and order type. Feel free to use the Client Order Id field if you need it.

### What liquidity do I see in the order books? <a href="#what-liquidity-do-i-see-in-the-order-books" id="what-liquidity-do-i-see-in-the-order-books"></a>

Order book displays accessible liquidity that is unique for a particular taker. If a taker does not have sufficient free Global and/or Counterparty limits, a part of the orders placed by liquidity providers is not displayed and is not tradable.

### What order types do we have? <a href="#what-is-ioc-and-fok" id="what-is-ioc-and-fok"></a>

We offer three main order categories (Market, Limit, and Pending Limit/GTC). Market and Limit orders can each be IOC or FOK.

* Immediate-or-Cancel (IOC). If it is not completely filled, the remaining amount will be cancelled. Partial fills are allowed.
* Fill-or-Kill (FOK). FOK order is an order that must be immediately filled entirely. Otherwise, it will be totally cancelled. No partial fills are allowed.
* Pending Limit Order allows takers, sub-takers or masters (on behalf of a client) to place orders at a specific price, even if the orders are not immediately executable. This is a Good 'til canceled (GTC) type of an order.&#x20;

### Who is a maker and who is a taker? <a href="#who-is-a-maker-and-who-is-a-taker" id="who-is-a-maker-and-who-is-a-taker"></a>

Finery Markets has a maker-taker concept. There are two types of users on the Platform: a maker and a taker.

* A market maker provides liquidity by posting orders to the Order Book; it may use "limit" and "postOnly" order types. Self-trades are prohibited.
* A market taker consumes liquidity and may use "marketIOC", "marketFOK", "limitIOC", "limitFOK" and "Pending Limit Order (GTC)" order types.

A maker's order may be matched only to an order of a taker; maker-maker trading is prohibited. Because of this, the book can occasionally appear locked or crossed — i.e. the best ask may be lower than the best bid — without producing a trade.

### Do you charge any fees? <a href="#do-you-charge-any-fees" id="do-you-charge-any-fees"></a>

* Tier 3: 3 bps, applied if turnover is < $50M
* Tier 2: 2 bps, applied if turnover is ≥ $50M and < $200M
* Tier 1: 1 bps, applied if turnover is ≥ $200M

## Post-Trade <a href="#post-trade" id="post-trade"></a>

### What is post-trade settlement? <a href="#what-is-post-trade-settlement" id="what-is-post-trade-settlement"></a>

As a result of trading, the Platform calculates net positions to settle in real-time. Post-trade counterparty settlement is peer-to-peer and may be in the form of a blockchain transaction, bank wire, or alike. The Platform is never a side to any deal and is not involved in the actual settlement. However, the Platform requires information about settled trades in order to apply updated limits to trading. A settlement (see the Settlements tab) is created when a settlement order is executed (i.e., settled). A settlement order is executed when a settlement transaction (see the Transactions tab) is committed (i.e., confirmed) by a receiving trading party.

### Is there any reporting? <a href="#is-there-any-reporting" id="is-there-any-reporting"></a>

Yes, you will receive a daily statement showing your limits, open positions, trades and settlement.

### What is an open position? <a href="#what-is-an-open-position" id="what-is-an-open-position"></a>

The sum of deals and settlements (i.e., settled deals) is an open position. For example, if you have bought 1 BTC for 10000 USD, your open positions are +1 BTC and -10000 USD; if then you have settled 0.6 BTC against 6000 USD and sold 0.4 BTC for 4100 USD, your resulting positions are 1-0.6-0.4=0 BTC and -10000+6000+4100=100 USD. You can see your current open positions on the Trades tab.

### Why do I need trading limits? <a href="#why-do-i-need-trading-limits" id="why-do-i-need-trading-limits"></a>

The central part of the concept is counterparty limits (please read [Limits Explained](https://finerymarkets.com/assets/files/1cc09a_b6c43485b5104c2c8fc59dd0b32b8a79.pdf)). You can make a trade only if you have trading limits set and your free limits are positive.

* there are Global limits, which apply to the overall activity of a user, and Counterparty limits, which apply to a particular counterparty of a user
* there are also Net limits and Gross limits
* Net Limit Utilization is equal to the current P\&L of all open positions
* Gross Limit Utilization is equal to the max of an abs value of all short positions and abs value of all long positions (see examples below)

The values of each limit are defined and set by a user (via API or in GUI: Trade > Limits). When calculating utilization, the Platform takes into account open orders and unsettled transactions; worst-case scenario approach is applied. Available for trading Net/Gross limit equals Net/Gross limit minus utilization.

### What is a Gross Limit?&#x20;

The Gross limit is regulating the maximum possible open position a taker or a maker may open (exposure). You can make a trade only if you have trading limits set and your free limits are positive.\
You have 2 limits:&#x20;

| Global Gross Limit                                                                                                                                     | Counterparty Gross Limit (Add new)                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Both makers and takers should set a global gross limit to start trading. It regulates the maximum possible open position across **all counterparties** | In order to start trading with each other, counterparties should set their counterparty limits against each other. It regulates the maximum possible open position **with** **a particular counterparty** |

Both of the limits use the following formula to calculate the gross limit utilization (exposure): \ <mark style="background-color:green;">Your exposure=MAX( |SUM(Long positions)|, |SUM(Short positions)| )</mark>\
\
*Example of positions expressed in gross limit*\
*The Counterparty Gross limit is 800000 USD*

| Asset | Value   | Comment                   |
| ----- | ------- | ------------------------- |
| BTC   | +10     | If 1 BTC equals 20000 USD |
| USD   | +200000 |                           |
| ETH   | -300    | If 1 ETH equals 1200 USD  |

Calculation = MAX(|+200000+200000|,|−360000|)\
Your exposure equals 400000 USD, and your free gross limit is (800000 − 400000) = 400000 USD. This means that you are able to buy or sell additional 20 BTCs (or equivalent quantities of other assets) at this given moment.

### What is an Equity?

Equity represents the result of your trading in the selected currency (i.e. your balance)\ <mark style="background-color:green;">EQUITY = SUM(Positions)</mark>

| Asset | Value   | Comment                   |
| ----- | ------- | ------------------------- |
| BTC   | +10     | If 1 BTC equals 20000 USD |
| USD   | +200000 |                           |
| ETH   | -300    | If 1 ETH equals 1200 USD  |

Calculation = (+200000 USD +200000 USD - 360000 USD) = 40000 USD

### Can I deposit or withdraw funds? <a href="#can-i-deposit-or-withdraw-funds" id="can-i-deposit-or-withdraw-funds"></a>

No, Finery Markets is a non-custodial platform, however, you will need to settle your open position against a market-maker.

### How can I settle my open positions? <a href="#how-can-i-settle-my-open-positions" id="how-can-i-settle-my-open-positions"></a>

Finery Markets is a peer-to-peer platform with post-trade settlement. This means that trading parties settle open positions directly with each other. In order to facilitate the settlement process, the Platform provides for a protocol that allows:

* Settlement Request, which is sending and receiving general requests for settlement;
* Settlement Transaction, which is sending and receiving information about a particular settlement transaction.

Settlement Request can be sent to any counterparty with a mutual counterparty limit. It specifies only the asset that an initiator wants to receive. Settlement Transaction is designed to send information about an actual blockchain transaction or a bank wire. Thus, it requires not only eligible counterparty but also an asset and its quantity:

* There is a restriction applied to adding a settlement transaction - the initiator must have a negative position in a specified asset against the counterparty, thus, the specified amount of the asset must be positive. The rationale here is that the initiator can add only such a settlement transaction that reduces the open position of a specified asset. Besides, an initiator cannot send more than it owes.
* Once a settlement transaction is added, a respected settlement order is created in the Platform; to send a settlement transaction an initiator must add TxId (it might be a hash of a blockchain transaction or a bank reference); once a settlement transaction is committed by the recipient, a respected settlement order is executed and a settlement deal is created in the Platform.

### What is 'Fee Paid by Recipient'? <a href="#how-can-i-settle-my-open-positions" id="how-can-i-settle-my-open-positions"></a>

**For Takers**\
If you intend to request a settlement below the threshold of your Liquidity Provider (Market Maker), put the tick in the “Fee paid by me” checkbox. The fee will be deducted from the requested amount, thus the amount you will receive to your wallet or custodian account will be smaller than the one you have requested. The fee amount will be shown in your settlement history.

If you use API for automated settlements, please note that the amount will not be adjusted in the incoming settlement transaction. You will have to deduct the `Network Fee` from the `Amount` on your end. Hence the amount in the transaction will differ from the amount received by your wallet.

**For Makers**

If the Taker sends the Settlement Request with `Efx::Flags 1` - Fee paid by recipient , kindly note that  you must specify the network fee when sending the settlement transaction.

For example:

1. The Taker requests 18 000 USDT with Flag 1
2. Send the 18 000 USDT deducting the fee. For instance 17800 USDT sent and 200 USDTs were the network fee.
3. Upon initializing the settlement transaction input the 18 000 in amount and 200 in Network fee

## API best practices

You can find the relevant API documentation [here](https://faq.finerymarkets.com/api-reference/quick-start-with-api).&#x20;

Examples for API implementation on [GitLab](https://gitlab.com/finery-markets/fm-code-samples)

### **Introduction** <a href="#introduction" id="introduction"></a>

Finery Markets offers an extensive list of API methods that cover 100% of the platform’s features. To attain bespoke performance the users must comply with the suggested practices listed below

### **FIX protocol nuances**

1. If you are using the FIX protocol, please make sure you don’t have two instances of separate connections from one IP. FM core won’t respond back to the one that attempts to connect later, since we consider that there’s an active logon session already.
2. Please mind that the ‘heartbeat’ functionality is not enabled for FIX sessions at the moment. If you wish to check connectivity, please send a TEST message instead.

### **Connecting to market data**

1. We urge connecting only to the instruments intended for trading. You may use instruments whitelisting in the GUI to limit the available instruments.
2. X-check that you are not subscribed or requesting methods that are not in use
3. When using FIX, please use 2 separate API keys. The 1st one is for Market Data, and the 2nd one is for trading.
4. FM Market data is updated every 25 ms per instrument by default. We recommend that you test your system with that load in mind or design a throttling logic on your end. Note that market data throttling doesn’t impact order execution.

### **LP Order submission (for LPs and Masters intending using LP functionality)**&#x20;

1. The golden standard for supplying liquidity:
   * Whenever you need to modify an order, use **/mod** instead of canceling the previous order and submitting a new one
   * Don’t update the order unless you intend to change price/quantity of the order; your current order won’t expire
   * NB: Finery Markets has a speedbump of 100ms for takers to protect you from the toxic flow
2. We offer markups per pair (individually bid & ask) and per client hence we suggest streaming a raw orders to Finery Markets. The markups can be adjusted via API or GUI
3. There’s a rate limit of 2000 RPS per account on FIX API (and it will be extended to WS)&#x20;

### **API keys**

1. In most cases you have more than one API key. Please always make sure you are using the one with appropriate access level: View only | Trading allowed | Settlements allowed, etc (see [Multi-Roles](https://faq.finerymarkets.com/product-features/control-center/multi-roles) for the full list). If you are receiving “Error 3: Not authorised” it’s likely that you are using a wrong API key.
2. Make sure you are not using the same API key with multiple asynchronous REST clients, as in this case nonce system may malfunction (which is not a bug, but a valid security alert). In this case you should receive “Error 6: Invalid nonce”.

### **Timestamp**

**Q:** How to find the last nonce without a key reset?

**A:** We recommend using a timestamp (e.g., 1674504823). This way, you will always understand the logic behind it, and your next timestamp will always be greater than the previous one.

1. Make sure your system clock is synchronized.
2. Make sure your payload contains a `"timestamp"` field.
3. Make sure you use UTC time.
4. Make sure it is in milliseconds.
5. Make sure there are no delays between setting a timestamp and sending a request.

### **Non-trading API features**

FM API supports all features available in UI, including non-trading (risk management, user management, etc)

1. We recommend avoiding excessive requests on non-trading API features, as that may affect the system performance. Non-trading API features often are more resource consuming and are designed to be less latency sensitive from our end. &#x20;
2. Here are some examples of non-optimal use of the API and clarifications of recommended behavior.&#x20;
   1. **Don’t** request trade history after every trade, especially without filters narrowing down the response
      1. Instead: Listen to trade execution report over WS / FIX
   2. **Don’t** update risk limits at every tick of market data to adjust to the conversion rate
      1. Instead: Add instrument limits for the respective asset
   3. Make sure you do not send invalid requests.
   4. Make sure you don’t create too many connections and do not reconnect often.
   5. If you need to request same data frequently, check if it is possible to use a data feed instead.
   6. If you wish to monitor a particular order’s execution, **don’t** request the entire history. Instead:
      1. wait for a response to the request, or
      2. use Feed 'O' to subscribe to a particular order

### Order Size, Balance Steps, and Rounding

Understanding balance steps and rounding is pivotal for a successful integration. If you're receiving an error "83 Invalid order volume, please check that the data type in the order matches the data type in /add",  this section will help you resolve it.

#### Internal units handling

Price and size must be converted to internal units before order submission, and they must adhere to the instrument's balance step.

**Internal unit = 0.00000001 (1e-8)**

The maximum precision is always 8 decimals.

**How balance steps will impact your order:**

Use `POST api/instruments` to get the balance step value for any instrument. This determines the precision for your order size.

**Example: Submitting an order for 4536.15 USDT**

1. Call `POST api/instruments` → USDT balance step = 100
2. USDT order can be placed with the following precision: 0.00000001 × 100 = 0.000001 (6 decimals)
3. Your order of 4536.15 USDT is valid because it is aligned with the 6 decimal precision
4. Convert the value into internal units: 4536.15 ÷ 0.00000001 = 453615000000

**An invalid example: 4536.1500001 USDT**

* This order will be rejected because it exceeds the 6 decimal precision
* You must round it to 4536.15000 USDT to match the balance step

{% hint style="warning" %}
Error "83 Invalid order volume" occurs when your order size doesn't align with the instrument's balance step
{% endhint %}

**Common balance steps:**

| Currency | Decimals | Balance Step | Example         |
| -------- | -------- | ------------ | --------------- |
| BTC      | 8        | 0.00000001   | 1.23456789 BTC  |
| USDT     | 6        | 0.000001     | 123.456789 USDT |
| USD      | 2        | 0.01         | 123.45 USD      |
| EUR      | 2        | 0.01         | 123.45 EUR      |

#### Rounding rules

FM rounds up or down in favor of the market maker to prevent fraudulent behavior (e.g., repeatedly buying tiny amounts that would round to zero with standard rounding). Rounding in the execution report is side-dependent.&#x20;

| Order side (taker) | Rounding rule                                                |
| ------------------ | ------------------------------------------------------------ |
| Buy                | Volume is always rounded down to the nearest balance step    |
| Sell               | Volume is always rounded up to the next nearest balance step |

**Which balance step to apply?**

The balance step is applied depending on which data type you use. Let's take USDT-EUR as an example &#x20;

**Using `size`:**

* You specify the **quote-currency** amount (e.g., 100 USDT)
* You compute the **quote-currency** amount
* Apply the **quote-currency** balance step (0.000001)

**Using `volume`:**

* You specify the **base-currency** amount (e.g., 100 EUR)
* You compute the **base-currency** amount
* Apply the **base-currency** balance step (0.01)
* Restrictions: Takers only, Firm Book only

{% hint style="info" %}
&#x20;You cannot use both `size` and `volume` in the same order
{% endhint %}

**Example of a USDT–EUR**

The order book data is delivered in internal units. Firstly, convert the units:

* Raw data: \[86321460, 2794309705200]
* Price: 86321460 / 1e8 = 0.8632146
* Size: 2794309705200 / 1e8 = 27,943.097052 USDT

**Example: Order by  `size`**&#x20;

If you are buying as a Taker

```
Step 0: Buy 27,943.097052 USDT
Step 1: 0.8632146 × 27,943.097052 = 24,120.8893445034 EUR
Step 2: Result (Volume): 24,120.88 EUR (Rounded down to the balance step of EUR (0.01))
```

If you are selling as a Taker

<pre><code>Step 0: Sell 27,943.097052 USDT
<strong>Step 1: 0.8632146 × 27,943.097052 = 24,120.8893445034 EUR
</strong>Step 2: Result (Volume): 24,120.89 EUR (Rounded up to the balance step of EUR (0.01))
</code></pre>

### **Limit orders for takers** <a href="#limit-orders-for-takers" id="limit-orders-for-takers"></a>

FM operates under a taker-maker model; takers only consume liquidity. Due to that, **taker accounts cannot create resting limit orders** - orders that are placed in the order book but are not immediately executable because the specified limit price has not yet been reached.

The limit orders available to the taker accounts are:

* LimitIOC - an aggressive (liquidity consuming) order that attempts to execute at the specified price and is canceled immediately after the attempt, regardless whether it has been filled, partially filled or not filled at all. ‘IOC’ stands for ‘immediate or cancel’
* LimitFOK - an aggressive (liquidity consuming) order that attempts to be immediately fully filled at the specified price and is canceled if that’s impossible. ‘FOK’ stands for ‘fill or kill’

Example:

<table data-header-hidden><thead><tr><th width="139"></th><th></th></tr></thead><tbody><tr><td><strong>Size</strong></td><td><strong>Price</strong></td></tr><tr><td><mark style="color:red;">3</mark></td><td><mark style="color:red;">60000</mark></td></tr><tr><td><mark style="color:red;">2</mark></td><td><mark style="color:red;">58200</mark></td></tr><tr><td><mark style="color:red;">4</mark></td><td><mark style="color:red;">58100</mark></td></tr><tr><td><mark style="color:red;">2</mark></td><td><mark style="color:red;">58000</mark></td></tr></tbody></table>

Imagine the table above is our tradable Bitcoin order book. Under such market conditions:

* A limitIOC buy order with size = 3, price = 58100 will get filled with 2 BTC @ 58000 and 1 BTC at 58100
* A limitIOC buy order with size = 3, price = 57000 will be canceled unfilled (because there are no asks at this price at all)
* A limitFOK buy order with size = 3, price = 58500 will get filled with 2 BTC @ 58000 and 1 BTC at 58100
* A limitFOK buy order with size = 3, price = 58000 will get canceled unfilled (because there’s not enough supply of BTC @ 58000 to fill this order completely)

What is the difference from marketIOC and marketFOK then?

These two orders don’t require a specified price. They attempt to execute (under IOC and FOK logic respectively) without price limitations. In our previous example,

* A limitIOC buy order with size = 10, price = 59000 will get filled with 2 BTC @ 58000, 4 BTC at 58100 and 2 BTC at 58200, and stop at that, as it can’t buy above 59000
* A marketIOC buy order with size = 10, however, will get filled with 2 BTC @ 58000, 4 BTC at 58100, 2 BTC at 58200 and 2 BTC at 60000, never stopping until it gets filled completely or reaches the client’s trading limit
* A marketFOK buy order with size = 3 will get filled with 2 BTC @ 58000 and 1 BTC at 58100

### API conformance <a href="#api-conformance" id="api-conformance"></a>

Before going live we strongly recommend to:

1. Provide a short integration document so we’re aware of your planned approach to integration and what methods you plan to use
2. Execute following scenarios on Test environment (see below)
3. Ensure prod-like activity over some period of time (e.g. several hours)&#x20;

#### Scenarios for Test environment <a href="#scenarios-for-test-environment" id="scenarios-for-test-environment"></a>

**For Takers**

1. Log in using the provided credentials
2. To obtain the Tradable Order Book, either
   1. subscribe to **Feed 'F'** via [Websocket API](https://faq.finerymarkets.com/api-reference/websocket-api/feed-f-tradable-order-books), or
   2. request the **POST api/book** via [Rest API](https://faq.finerymarkets.com/api-reference/rest-api/book)

      You will receive a snapshot of the specified order book with max 25 levels on each side: price & size.&#x20;
3. Choose the instrument you are interested in
4. Try and make the first test trade using the **“/add”** command.
   1. "clientOrderId": you can just use a timestamp
   2. "price" & "size" can be taken from the order book you’ve just received

**For Market Makers**

Please refer to [this scenario](https://faq.finerymarkets.com/api-reference/quick-start-with-api/for-market-makers).

## Technical <a href="#technical" id="technical"></a>

### Do you have a testing environment? <a href="#do-you-have-a-testing-environment" id="do-you-have-a-testing-environment"></a>

Yes, for testing in the demo environment, please, visit [Request Demo page](https://finerymarkets.com/demo.html)​

### Do you support API? <a href="#do-you-support-api" id="do-you-support-api"></a>

Yes, the Platform supports [REST](/api-reference/rest-api) and [WebSocket ](/api-reference/websocket-api)APIs for both view-only and trading purposes.


# FM Liquidity Match

### Finery Markets eOTC-as-a-Service takes our groundbreaking marketplace approach a step further in dealing with Liquidity Providers.

> “To create something genuinely new, you have to start again, and we believe that with great intent we have opened a whole new world for businesses dealing with crypto.”
>
> Konstantin Shulga, CEO and Co-Founder of Finery Markets

### Go beyond an execution venue — delegate to us what hinders your growth

#### eOTC-as-a-Service will provide an All-in-One solution to

* Establish a **sub-account structure** to manage your clients&#x20;
* Stream orders from other LPs with or without your own liquidity to the accounts of your clients
* Aggregate and **resell** liquidity from multiple LPs using our Matching Engine
* Manage [**markups**](/product-features/trading/markups) **and** [**overnight rates**](https://faq.finerymarkets.com/overview/about-our-products/pages/ZUQoVImm7uH6Fljm2jUL#id-7.-what-is-overnight) on a per-client and per-asset basis.
* Utilize a [**risk management system**](/product-features/risk-management) to control the mark-to-market value of the customers' assets

### How will I benefit from eOTC-as-a-Service?

<details>

<summary>Prime Brokers</summary>

![](/files/IeBeClEgRdpiwguPuZl3)

Enhance Prime setup with benefits of electronic OTC access: Post-trade settlement, Firm and non-firm aggregated liquidity, Minimal market impact

</details>

<details>

<summary>Liquidity Providers</summary>

![](/files/Rwd7xXDGS03esTXalsNZ)

Utilize Finery Markets' GUI, API, and Matching engine for client management, and reporting. Enrich your liquidity or have a backup contingency plan with this product

</details>

<details>

<summary>OTC Desks</summary>

![](/files/pPATwom138vP8JrMlLOT)

Automate your client operations with reselling firm and non-firm aggregated liquidity from Liquidity providers on Finery Markets

</details>

<details>

<summary>Payment Institutions</summary>

<img src="/files/2AdVneWQERycMKiXpRUM" alt="" data-size="original">

Give your merchants an efficient and elegant API or GUI face to hedge and execute their trades, while you maintain control of their markups. No IT development is required on your end. &#x20;

</details>

<details>

<summary>Lending Desks</summary>

![](/files/QKofc74EynqOJ77a4Lca)

Add liquidity provision service with no need to perform any technical setup. Simply have the necessary crypto-licensing. &#x20;

</details>

<details>

<summary>Crypto Businesses with multiple legal entities</summary>

![](/files/HYDaUWkYLBOxCYgp62pg)

Streamline operations across entities. Onboard once and share liquidity among the entities while maintaining an overview of group-wide exposure. And the best part? It can all be done through a single API connection.

</details>

### FAQ

#### Can I resell liquidity from other LPs?

Yes, you can — as a [Master Account](/overview/about-our-products/fm-liquidity-match/master-account). Below are some detailed examples of how this might work.

#### How does FM Liquidity Match work?

Imagine you're a **Liquidity Provider** currently executing trades via phone or messenger and looking to transition to a digital platform. Here's how it would work:

1. Connect with a member of Finery Markets' sales team to establish an account.
2. Undergo KYC with the preferred Liquidity Providers (LPs) on the platform, chosen based on pairs, banks, and jurisdiction.
3. Set up a trading limit with the LPs.
4. Create a maker sub-account to stream your liquidity and set a limit for the maximum value of posted orders.
5. Log in to the maker sub-account.
6. Generate API keys and begin streaming prices using the key.
7. Add your clients by creating taker sub-account(s).
8. Configure [limits](/product-features/risk-management), [markups](/product-features/trading/markups), and margin requirements (if necessary) for your clients.
9. Commence trading. The system will automatically aggregate and execute trades based on the best bid or ask.

Or let's imagine you're an **OTC desk** seeking a contingency plan, looking to enhance liquidity offerings, or aiming to outsource liquidity aggregation:

1. Connect with a member of Finery Markets' sales team to establish an account.
2. Undergo KYC with the preferred Liquidity Providers (LPs) on the platform, chosen based on pairs, banks, and jurisdiction.
3. Set up a trading limit with the LPs.
4. Add your clients by creating taker sub-account(s). They may trade through GUI or through API.
5. Configure [limits](/product-features/risk-management), [markups](/product-features/trading/markups), and margin requirements (if necessary) for your clients.
6. Start reselling. The system automatically aggregates and executes trades based on the best bid or ask.

#### Would I settle with every LP individually?&#x20;

Yes, you would be settling with them individually while your client would be settling with you only. Please keep in mind the LPs will release crypto once you settle your leg of the trade (see [Settlements](/product-features/settlements) for more details)

#### What is the limit that Finery Markets is referring to?&#x20;

It's a value agreed upon by both you and the Liquidity Provider (LP) for trading. All trades on Finery Markets operate on a post-trade settlement basis. To initiate trading with each other, counterparties must set their counterparty limits. This regulates the maximum potential open position with a specific counterparty. To learn more, please refer to the [Risk Management](/product-features/risk-management) article.

#### Could sub-accounts have multiple authorized users?

Yes, they may have up to 10 authorized users with different [sets of rights](/product-features/control-center/multi-roles).

### If you are a current user of the eOTC-as-a-Service account, please select a role to learn more

{% content-ref url="/pages/UkppKOcgojGToBR01o9C" %}
[Master Account](/overview/about-our-products/fm-liquidity-match/master-account)
{% endcontent-ref %}

{% content-ref url="/pages/v29o99ulA6MlvaSdSJ5F" %}
[Sub-Account](/overview/about-our-products/fm-liquidity-match/sub-account)
{% endcontent-ref %}


# Master Account

This page is for an operator of the master account

### How do I set up a limit with a new LP?

1. Choose 'Risk management' from the menu
2. Click '+ New connection' in the top right corner
3. Type in the ID provided by the LP
4. Select the currency and the maximum value of the positions you trade with them
5. Enable trading

### How do I place my orders?

1. Log in to the master account
2. Issue API keys and stream prices using the key

To add orders please refer to our [trading API](https://faq.finerymarkets.com/api-reference/rest-api/trading).&#x20;

### How do I create a sub-account for my client?

<figure><img src="/files/065NNhvqXBiFLf4p6rLD" alt=""><figcaption></figcaption></figure>

1. Find the Sub-accounts placeholder in the bottom-left corner of any page
2. Click the ‘+’ (plus) icon
3. Enter the required details:
   * Display name – name for the sub-account
   * Email address – client’s email
   * Account type – select the appropriate type (ussually 'sub-taker')
4. Click 'Create New Sub-account' to send the invitation

After creation:

* Your client will receive a signup email. They must follow the link and complete registration.
* Once the client completes signup, the new sub-account will appear on your Sub-accounts page.
* You can then configure the client’s risk profile and enable trading as needed.

### How do I set up the requirements for the sub-account?

1. Open 'Risk Management' tab
2. Click 'Edit' next to the client you wish to modify
3. Adjust the available gross limit to regulate the overall liquidity, or switch to the 'Assets Control' tab within the same pop-up box to manage the liquidity for each individual asset.

### How do I set up a markup for the sub-account?

1. Open 'Assets & Instrument' -> 'Markups' tab
2. Click 'Configure'
3. Select groups or a sub-account you wish to set up markup for (all are selected by default)
4. Chose between Default markup and Markup per Instrument.
5. Input the desired markup in %. The spread will become wider by the value you have provided

{% hint style="warning" %} <mark style="color:red;">Important:</mark> please bear in mind that markups in FM are currently only applied to outgoing liquidity, not to incoming liquidity. Hence, if you are both providing your own liquidity to your sub-accounts and re-selling liquidity from other makers, setting up a markup for your sub-account does not guarantee liquidity flow internalization (your sub-taker will still source liquidity from the maker which has the most competitive pricing), however it enables you to make money on every flow
{% endhint %}

<figure><img src="/files/EF0Mjxji6ikRXvNHShDB" alt=""><figcaption><p>Markup case study</p></figcaption></figure>

In the case illustrated above:

* Master streams raw prices to FM
* Master has set a 0.4% markup for his Sub-taker B
* Maker A has set a 0.2% markup for his counterparties (including our Master)
* Sub-taker B will see:
  * Prices from his Master with a 0.4% markup applied
  * Prices from Maker A with both 0.2% and 0.4% markups applied

You don't need to have a maker sub-account to:

* Stream your own orders
* Resell liquidity from other providers

The logic behind the application of markups in all possible cases can be found in the [Interdealer Trading](/product-features/trading/interdealer-trading) article.

### How to perform a settlement?

1. Click on 'Positions'
2. Red means that your client owes you the asset, black means that you owe the asset to the client
3. Click on the arrow at the end of the row. It will bring you to a 'Transactions' tab (outgoing payment)

When you send the asset to your client please perform the settlement on the platform:

1. Click on 'Positions'
2. Click on the arrow in the row of the asset highlighted in red
3. Validate the amount
4. Press 'Create transaction'
5. Make the actual settlement either from crypto wallet or bank
6. Input the hash / TxID / banking reference that your client may use for validation
7. Press 'Commit withdrawal'

When you request an asset please follow these instructions:

1. Click on 'Positions'
2. Click on the arrow in the row of the asset highlighted in black
3. Validate the amount
4. Press 'Create transaction'
5. Once your client sends the assets, you will need to confirm the receipt
6. Input the hash / TxID / banking reference of the incoming transaction
7. Press 'Commit deposit'

You can automate requests and transactions using our [API for settlements](https://faq.finerymarkets.com/api-reference/rest-api/settlements).

### For any additional questions, explore the features on the right


# Sub-Account

This page is reserved for clients who have been invited to the platform

### How do I make a trade?

**If you are using GUI**, please go to the "Trading". Select or search for the pair you wish to trade. The volume is nominated in the asset you see to be first in the pair. However, if you wish to input the value in the currency the asset is traded against, press "↺"

**For the trades via API**, please issue yourself a key and refer to the following methods:\
*For REST*

To retrieve the book use

{% content-ref url="/pages/KGixTxfDw51J82MQ1xrB" %}
[book](/api-reference/rest-api/trading/orders-and-order-book/book)
{% endcontent-ref %}

To post an order please use

{% content-ref url="/pages/nlsN8zsXouVbRVhkNvHh" %}
[add](/api-reference/rest-api/trading/adding-orders/add)
{% endcontent-ref %}

*For WS*&#x20;

To retrieve the book use

{% content-ref url="/pages/PqMFL1aegwGCHgWoKwmv" %}
[Feed 'F' - Firm Market Data](/api-reference/websocket-api/feed-f-firm-market-data)
{% endcontent-ref %}

To post an order please use

{% content-ref url="/pages/nlsN8zsXouVbRVhkNvHh" %}
[add](/api-reference/rest-api/trading/adding-orders/add)
{% endcontent-ref %}

### How do I know how much I can trade?

The information about total accessible liquidity is available in the "Risk Management" tab or by going into "Trading" section.&#x20;

### How to perform a settlement?

1. Click on "Positions"&#x20;
2. Red means that your client owes you the asset, black means that you owe the asset to the client
3. Click on the arrow at the end of the row. It will bring you to a Transactions tab (outgoing payment) or Request tab&#x20;

When you send the asset to your counterparty please perform the settlement on the platform

1. Click on "Positions"&#x20;
2. Click on arrow in the row of the asset colored red
3. Validate the amount
4. Press "Send Assets"
5. Click on the envelope button
6. Make the actual settlement either from crypto wallet or the bank account
7. Input the hash / TxID / banking reference that your counterparty may use for validation
8. Press "Send"

When you request an asset please follow these instructions

1. Click on "Positions"&#x20;
2. Click on arrow in the row of the asset colored red
3. Validate the amount
4. Press "Request Assets"
5. Once your client sends you the assets, you will see an incoming transaction in the "Transactions" tab that you will have to commit upon receiving it

### For any additional questions, explore the features on the right


# FM Pulse

Data-driven tool to assess spreads across major venues and FM LPs

<figure><img src="/files/ECFt6ITLRzQWgjTzTPeV" alt=""><figcaption></figcaption></figure>

### [Finery Markets Pulse](https://pulse.finerymarkets.com/) is an easy-to-use analytical tool for the analysis of effective spreads across the leading trading venues.

### What does this tool help with?&#x20;

1. If you are not a customer of Finery Markets, you may have guest access to assess the total cost of execution for some pairs. Specify the pair, amount, and your monthly trading volume and we will compare the spreads
2. If you are a customer of Finery Markets, log in and you will have an extensive list of pairs for comparison
3. If you are a liquidity provider on Finery Markets, you can compare your orders to the aggregated prices from other LPs

### How do I compare the cost of OTC execution against major exchanges?

<figure><img src="/files/dCqKc4tfgcyecXWgW3aJ" alt=""><figcaption></figcaption></figure>

1. Log in to pulse.finerymarkets.com
2. Select Spreads
3. Choose an instrument
4. Select the size of the trade
5. Specify the monthly turnover to adjust the fees applied by the exchanges

#### How can I analyze the behavior of my Takers?

Taker analytics has moved into the Finery Markets platform. It is now available as the **Analytics** section, with no separate login and a refreshed interface. There you can track turnover, counterparty concentration, pocket share, PnL and Buy / Sell volume across custom date ranges.


# White Label solution

Launch a fully branded B2B crypto trading business in under one week. Access unparalleled crypto liquidity from reliable liquidity providers and resell it to other businesses worldwide

<figure><img src="/files/DcmS0BLGozUarNYGLgxR" alt=""><figcaption></figcaption></figure>

### What is FM White Label?

FM White Label is a fully customizable version of FM Liquidity Match — the market’s first ECN-as-a-Service platform.

### What am I getting?

* Your unique sub-domain
* Your logo and favicon instead of ours in every interface
* Your branded color throughout the whole platform
* Your endpoint for client API requests
* Customizable emails for client registration and customer support
* Dedicated Demo environment for live client demonstrations and API connection testing
* Zero integration work
* Zero surcharge per customer
* Hidden T\&C and FM document links

### Where can I learn more?

Please refer to the [official page of the FM White Label](https://finerymarkets.com/white-label.html) which contains all the details and necessary contacts.<br>


# Onboarding

Seamless process to start trading

<figure><img src="/files/2SQUcGSoLtBJ1w089Xv4" alt="" width="375"><figcaption><p>Onboarding process</p></figcaption></figure>

### A seamless way of selecting and onboarding with your counterparty on Finery Markets the moment you say 'Yes' to firm, non-firm and deep liquidity.

Finery Markets Onboarding is an extension of our existing marketplace. It is the first step you will take after logging into the production environment. Upon logging in, you will be prompted to input your company's data and specify your counterparty requirements. Then, you can begin the onboarding process with the liquidity provider that best suits your needs.

{% tabs %}
{% tab title="Takers" %}

### How many steps are there?&#x20;

1. Enter your company's legal data.
2. Accept the T\&Cs for using our software.
3. Provide details about your trading preferences.
4. Select a provider from the recommended list.

### **Can I close the tab?**

Yes, you will have to re-login into the system to see the list of the providers

### How do you make the LP recommendation?&#x20;

We make recommendations based on the data provided: the banks you are using and the pairs that you are trading.

### I have selected a liquidity provider, what should I do next?

The steps are shown on the screen. They usually start with an introduction call. The introduction call is necessary to validate a few compliance and business requirements by a person on the liquidity provider's side.

### Can I have access to view-only Market Data of the LP?&#x20;

Once the LP approves your connection request, they have the option to switch on the view-only market data feed while you continue with the onboarding process.

You will receive a platform and email notification as soon as they grant this access. After receiving the notification, navigate to the Trading page to access View-Only Market Data. [More on view-only market data](/product-features/trading/market-data-view-only).

### What would be the last step of the onboarding?

The last step of onboarding is setting up the limits.&#x20;

<figure><img src="/files/B6GSxvGL1ZcO3OuZmK6z" alt=""><figcaption></figcaption></figure>

Once the KYB process is complete, the Liquidity Provider will set the initial limit. Then it will be your turn to adjust the limits. We have provided preset trading limits, but you can modify them to any value. To learn more about limits, read the [Risk Management section](/product-features/risk-management)

### What if I'm experiencing difficulties during the onboarding process?&#x20;

You can always contact the sales person from Finery Markets for assistance.

### What if I require API Integration?&#x20;

During the account creation process the system will ask you if you need a test account (sandbox) for the API set up. Please keep in mind that the API integration comes with a fee.&#x20;
{% endtab %}

{% tab title="Liquidity Providers" %}
Takers will request introductions to you through our onboarding tool.&#x20;

### What kind of data will I receive when the taker requests an intro?

You will receive an email with the following fields

<figure><img src="/files/mY05MWEl39XpG0tvR7Ty" alt=""><figcaption><p>Sample Email</p></figcaption></figure>

### Which steps may I implement for my onboarding process?&#x20;

We suggest the following options:

1. Introductory call
2. Providing the taker with your KYB form and required documents

You can take these steps in a different order or opt to request only the documentation.

### What would be my next step after the successful KYB?&#x20;

Please go to the Risk Management section and set up the limit. The ID for the taker is provided in the initial email. This will trigger the completion of the onboarding process.
{% endtab %}

{% tab title="Sub-accounts" %}

### How many steps are there?&#x20;

1. Enter your company's legal data.
2. Accept the T\&Cs for using our software.

### **Can I close the tab?**

Yes, you will have to re-login into the system to see the list of providers

![](/files/QdlBrOhO1dH3VLy7yXYy)
{% endtab %}
{% endtabs %}


# Risk Management

Institutional approach in Crypto

Automate your counterparty relationships, and reduce risk, all on one screen.&#x20;

We provide trading restriction mechanisms and other tools that strengthen protection against credit or market risk.&#x20;

{% tabs %}
{% tab title="For Takers" %}

### First Steps

**Step 1: Create connection**\
Upon first log in, set up trading with your Liquidity Provider.

<figure><img src="/files/Oeo76iR5Z4vBDaKLKjOR" alt=""><figcaption></figcaption></figure>

**Step 2 (optional): Set currency and limits**\
Open the “Gross limit & margin” section. Enable the gross limit, choose the required currency, and specify the limit amount. Click “Apply Changes” to save.

<figure><img src="/files/1zvzt8ue8hoO9JdDYFnk" alt=""><figcaption></figcaption></figure>

**Step 3: Enable trading**\
Open the “Trading status” section. Click “Enable Trading” to finish the setup.

<figure><img src="/files/8l4wyfGlz7PDKVI5JlGz" alt=""><figcaption></figcaption></figure>

**Step 4: Add more Counterparties**\
To add a new Counterparty, click "+ New Connection" and enter the Counterparty ID. The Counterparty will appear in the Risk Management profiles list with a "Verification" status until the invitation is accepted.

**Step 5: Monitor Connections**\
After adding multiple Liquidity Providers, use the "Overview" widget to track statuses. View both incoming and outgoing connection requests on Risk Management page.

<figure><img src="/files/hJIzQ1thwe3JaRypxWdg" alt=""><figcaption></figcaption></figure>

### What does this section regulates?

This section regulates the risk management parameters with your liquidity providers. Set up a desired limit on your end, and the liquidity provider will set up a limit on their end. The smaller of the two will apply.

Once the KYC is complete, you will need the ID to set up a limit on your end.

### What is a counterparty limit?

It is a value that both you and the Liquidity Provider (LP) determine for trading.\
To start trading with each other, counterparties may set their counterparty limits against each other. It regulates the maximum possible open position with a particular counterparty.

**a.    Do I need to settle every trade?**\
No. You may lock the exchange rates and settle in bulk.

**b.    How does the liquidity provider assign the limit?**\
It depends on their risk assessment policy, your jurisdiction, etc.

**c.    Is it a renewable limit?**\
Yes. Once you settle what you owe your liquidity provider and withdraw the assets, the limit will restore to its initial value

**d.    My limit is nominated in USD, does this mean I can only buy crypto for USD?**\
No. You may execute crypto-crypto or any crypto-fiat trades. However, the value of the results of the trade cannot exceed the limit nominated in USD.

**e.    What if I need a temporary increase in the limit for bulk trade?**\
Please contact us and your liquidity provider for the temporary increase of the limit.&#x20;

**f.      Will I have access to more liquidity if my limit gets increased?**\
Yes. You only see the liquidity that your gross limit permits. <br>

### What is a gross limit?

The Gross limit is regulating the maximum possible open position taker or maker may open (exposure). You can make a trade only if you have trading limits set and your free limits are positive.

**a.    How do you calculate the gross limit?**\
We take the absolute values of everything you see in positions tab and summarize them using the formula below. Mind you that deposits also utilize the limit as well as uncommitted settlement transactions.\
*Formula:*

*MAX( |SUM(Long reachable positions)|, |SUM(Short reachable positions)|)*

**b.    What if I set my limit in USD and my counterparty sets it in EUR?**\
We use a mark-to-market type of accounting thus we will recalculate the EUR value back to USD and will use the smaller value out of the two. The same logic applies to limits nominated in crypto.

**c.    What is an applied gross free limit?**\
This the value of how much you may use for long or short positions (buying or selling)&#x20;

### What is a gross limit by asset?

The gross limit by asset allows you to limit your open position in a particular asset.

It works the same way as a regular gross limit, but takes into account only positions in the particular asset.

You may set a limit by asset in any asset you find convenient. Limit value will be converted to the target asset using prices of the assets at the moment when risk management is applied.

### What is equity?

We summarize the value in USD of your open positions using the formula below:\
*EQUITY = SUM(Positions)*\
\
Since the base currency of our platform is USD, the assets you hold to maintain the required level of equity would be reevaluated against USD every 15 minutes. For example, if hold BTC as your collateral, its value may fall during the day to accommodate the limit in USD. Thus, your liquidity provider and the system would require you to top up the account.

### How do I set up a limit with my liquidity provider (LP)?

1. Go to Risk Management
2. Press '+ New connection'
3. Input the counterparty ID that you receive from your LP and 'Request Connection'
4. Enable the gross limit, select the limit currency, and enter the limit amount
5. Press 'Apply changes'

<div><figure><img src="/files/C4ACdbnQ6CUXukpqzCSe" alt=""><figcaption></figcaption></figure> <figure><img src="/files/1zvzt8ue8hoO9JdDYFnk" alt=""><figcaption></figcaption></figure> <figure><img src="/files/1wvIv542hgQiWtwBeaVo" alt=""><figcaption></figcaption></figure></div>

### Which currency I may use for the limits?

The one you use to evaluate your market exposure. Our recommendation is to use fiat currency (USD or EUR) for the limits.

### Which limit prevails if they are different?&#x20;

The smaller limit prevails over the greater one. For example,\
\
You have set 30 USD of Gross limit however, your LP has set only 10 USD for the counterparty limit described above. The system will use 10 USD as the limit.

### If my liquidity provider requires posting collateral, how do I know if it’s time to settle or top up?

If you see any of the following statuses: Margin Call, Low Gross Free, Restricted trading, liquidation - it’s time to top up.

### I have stopped seeing orders, what should I look for?

Firstly, please ensure you have available free gross limit

Check limits for special marks, it may be time to top up your account.

If everything checks out and the issue persists, please contact us or your liquidity provider.

### Can I disable trading with the liquidity provider?

You may disable trading with a counterparty by unticking the box in the card of the 'Edit' menu. The trading will be stopped while allowing settlements. It will be convenient if you prefer to stop trading while settling, trade with your counterparty for special occasions (e.g. trading during banking hours), or if you wish to halt trading. Please note that you will still be charged the overnight rate.

### Can I disable trading of certain coins with my counterparty?

Sure! Click on 'Edit' on the CP's card, select 'Limits per asset'. \
\
You can set the limit per asset either in the currency of the asset or in the other currency you prefer. In the case of the latter, we will use the mark-to-market approach to determine the value of the asset. \
\
Please keep in mind that if you have an open position nominated in the coin, your counterparty would still be able to trade with it until the moment the position is closed.&#x20;

<figure><img src="/files/CtXGismsZwxey2lf88zF" alt=""><figcaption></figcaption></figure>

### Can I restrict trading of the particular markets (trading pairs)?

Yes, whitelisting is a functionality that allows you to restrict trading to an approved list of instruments only. It is disabled by default; in order to enable it, please:&#x20;

1. Click 'Instruments' in the left hand menu
2. Switch to the 'Whitelisting' tab
3. Toggle the 'Whitelisting' switch at the top right of the corner. After you have enabled whitelisting for the first time, all instruments become non-whitelisted by default.

<figure><img src="/files/abFaqF0CQQ7UUxNlhq4R" alt=""><figcaption></figcaption></figure>

In order to whitelist an instrument, you need to switch on the toggle (1) as shown on the screenshot above. There are two tips that can make this process easier:

2. Click here to collapse the list, hiding the counterparties level of hierarchy. It will make the list much more readable.
3. Use the Search functionality to search for specific instruments

{% hint style="info" %}
Note: whitelisting applies to all your counterparties and sub-accounts.
{% endhint %}
{% endtab %}

{% tab title="For Liquidity Providers (LP) & Masters" %}

### What does this section regulate?

This section regulates relationships and risk management settings with your Counterparties (takers and other LPs). You may specify the buying power and requirements for the collateral if needed.

Once the KYC is complete, you will need the ID to set up a limit on your end.

### What is a counterparty limit?

To start trading with each other, counterparties may set their counterparty limits against each other. It regulates the maximum possible open position with a particular counterparty. Within this limit you may specify:\
\
1\. Gross limit regulates the maximum possible open position counterparties may open.

2\. Margin requirements restrict trading if the equity that your counterparty has with you exceeds the preset criteria.

You may use both of them or gross limit only.

### Which limit prevails if they are different?

In any circumstance, the system will always use the smaller value out of all. For example, if you allow your Taker to trade with you for 5 USD and your Taker limit is 10 USD, the system will use the 5 USD as a restriction for the maximum open positions.

### What is a gross limit?

The Gross limit is regulating the maximum possible open position counterparty may open. You can make a trade only if you have trading limits set and your free limits are positive.

**a.    How do you calculate the gross limit?**\
We take the absolute values of everything you see in the positions tab and summarize them using the formula below. Mind you that deposits also utilize the limit.

*Formula:*

*MAX( |SUM(Long positions)|, |SUM(Short positions)| )*

**What if I set my limit in USD and my counterparty sets it in EUR?**\
We use a mark-to-market type of accounting thus we will recalculate the EUR value back to USD and will use the smaller value out of the two. The same logic applies to limits nominated in crypto.<br>

### What is equity?

We summarize the value in USD of your open positions using the formula below:\
*EQUITY = SUM(Positions)*\
\
Since the base currency of our platform is USD, the assets you hold to maintain the required level of equity would be reevaluated against USD every 15 minutes. For example, if you hold BTC as your collateral, its value may fall during the day to accommodate the limit in USD. Thus, the system would require the taker to top up the account.

### How do I set up a relationship with my taker?

1. Go to Risk Management.
2. Click '+ New connection'.
3. Enter the counterparty ID provided by your taker and submit the connection request.
4. Specify markups *(optional)*. Read more about markups [here](/product-features/trading/markups).
5. Enable Gross limit *(optional)*.
6. Enable margin requirement if you require collateral *(optional)*.
7. 'Enable trading'

Once the taker enables trading on their side, they will start receiving your quotes.

<div><figure><img src="/files/b3lY4e4SFxAX2ZY33xD9" alt=""><figcaption></figcaption></figure> <figure><img src="/files/vXyg1U4LLFsOn3DNdG1R" alt=""><figcaption></figcaption></figure> <figure><img src="/files/nWrv5DsZsSb4IogsyfXX" alt=""><figcaption></figcaption></figure> <figure><img src="/files/So3tRTbkZlyQxr3E6DS4" alt=""><figcaption></figcaption></figure></div>

### Which currency I may use for the limits?

The one you use to evaluate your market exposure. Our recommendation is to use fiat currency (USD or EUR) for the limits.

### Which limit prevails if they are different?&#x20;

The smaller limit prevails over the greater one. For example,

Your taker has set a Gross limit of 30 USD however, you have set only 10 USD. The system will use 10 USD as a Gross limit

### How do I set up a taker if I require holding collateral?

You would need to enable margin requirement either upon set up or by clicking configure on the existing clients’ card. The values are in % and will be calculated from the value of the gross limit.

Here are a few tips on what those fields mean:

| Maintenance        | Once the equity reaches the specified value in % from the gross limit, you reserve the right to liquidate Takers’ positions                                                                                                | Input the smallest value                                                                         |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Restricted Trading | Once the equity reaches the specified value in % from the gross limit, the Taker will not be able to execute more trades unless the value of their equity improves                                                         | Input the value at which you wish to restrict trading                                            |
| Initial Margin     | The collateral that the taker must send to the maker to start trading. Keep in mind that the required % will always remain with you. You will not be able to send a transaction that decreases the % of the initial equity | Input the % of your required collateral for the limit specified in the Gross Limit section above |

### How do I disable trading with a particular counterparty?

You may disable trading with a counterparty by clicking 'Disable Trading' in the risk management profile. The trading will be stopped.&#x20;

### Can I disable trading of certain coins with a particular counterparty?

Go to 'Limits per Asset' in the 'Risk management'. From this screen, you may limit the amount of a particular coin traded as well as stop trading it together.

You can set the limit per asset either in the currency of the asset or in the other currency you prefer. In the case of the latter, we will use the mark-to-market approach to determine the value of the asset.

Please keep in mind that if you have an open position nominated in the coin, your counterparty would still be able to trade with it until the moment the position is closed.

<div><figure><img src="/files/gMb2fGFOE1c7vmTHQSt8" alt=""><figcaption></figcaption></figure> <figure><img src="/files/iShJZ0I4sADI2NeDMAY4" alt=""><figcaption></figcaption></figure></div>

### Can I restrict trading of the particular markets (trading pairs)?

Yes, whitelisting is a functionality that allows you to restrict trading to an approved list of instruments only. It is disabled by default; in order to enable it, please:&#x20;

1. Click 'Pricing & Instruments' in the left hand menu
2. Switch to the 'Whitelisting' tab
3. Toggle the 'Whitelisting' switch at the top right of the corner. After you have enabled whitelisting for the first time, all instruments become non-whitelisted by default.

<figure><img src="/files/AMLmGj2n3Vb75ZhTPlva" alt=""><figcaption></figcaption></figure>

In order to whitelist an instrument, you need to switch on the toggle (1) as shown on the screenshot above. There are two tips that can make this process easier:

2. Click here to collapse the list, hiding the counterparties level of hierarchy. It will make the list much more readable.
3. Use the Search functionality to search for specific instruments

{% hint style="info" %}
Note: whitelisting applies to all your counterparties and sub-accounts.
{% endhint %}

### How do I disable assets for a taker?

If you need to restrict a specific asset, go to Risk Management → Limits per asset.

<figure><img src="/files/0yQt3wgoquBOK96gKjJX" alt=""><figcaption></figcaption></figure>

You can either set the limit to 0 (not allowed) for all clients or configure it individually.

**To set the limit per asset:**

1. Press "Configure"
2. Select the asset or asset class
3. Choose the client or client group
4. Toggle the switch for 'Enable limits per asset'
5. Set the currency and limit amount to **0**
6. Click "Apply"

<figure><img src="/files/pq4isPfIfsjP37GXKhbE" alt=""><figcaption></figcaption></figure>

**To set only the short sales ban per asset:**

1. Press "Configure"
2. Select the asset or asset class
3. Choose the client or client group
4. Toggle the switch for "Enable limits per asset"
5. Disable “Same limit for short and long”
6. Enter the currency and set the short position limit to 0
7. Click "Apply"

<figure><img src="/files/RGTmC4KrYHMqQ5pvCXOJ" alt=""><figcaption></figcaption></figure>

### **What are the Overnights (Long and Short)?**

Overnight fees for long and short positions can be set on a per-asset basis, or for all assets, in the same 'Assets' tab. Please refer to [Non-deliverable Trading](/product-features/trading/non-deliverable-trading) for more information.

### How would I liquidate the taker if their equity has fallen below the specified parameter?

Please contact us through Instant Messenger or through <help@finerymarkets.com>.&#x20;
{% endtab %}
{% endtabs %}


# Trading

Learn about FM's trading features

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td></td><td><a href="/pages/GR2TCmxSsXbzHWiAvWfc">Aggregated order book</a></td><td></td></tr><tr><td></td><td><a href="/pages/tELomoZOam98gfJvkt3i">Firm Streaming orders</a></td><td></td></tr><tr><td><a href="/pages/JJo3kE803kIB58DF8zeE">Quote Streams</a></td><td></td><td></td></tr><tr><td></td><td><a href="/pages/8pNcy58l16P3cQT22baK">Interdealer Trading</a></td><td></td></tr><tr><td><a href="/pages/FvMDpi22gHouGghszym1">Markups</a></td><td></td><td></td></tr><tr><td><a href="/pages/kLw0zWuf5U8hRSuG24ad">Non-Deliverable Trading</a></td><td></td><td></td></tr><tr><td><a href="/pages/fHcssy2dXh0lk5T2jUpb">Voice Trading</a></td><td></td><td></td></tr><tr><td><a href="/pages/pnSDG6EsyEKJowWUtPLG">Pending limit orders</a></td><td></td><td></td></tr><tr><td><a href="/pages/pnSDG6EsyEKJowWUtPLG">Pending Limit Orders (GTC)</a></td><td></td><td></td></tr></tbody></table>


# Aggregated Order Book

Single access to global Liquidity Providers

<figure><img src="/files/JWsJMhVQ8mTHC4ETp4MZ" alt=""><figcaption></figcaption></figure>

### What is an aggregated order book?

If you are trading with more than 1 liquidity provider (LP), their orders will be aggregated in 1 order book. The system will show the orders filtered by price and time priority.

### Why is this beneficial for me?

It will improve the spread and the total cost of execution because you will utilize the best offers from multiple LPs while executing the trade

### How would I know whom did I execute with?

Upon execution, the system will show this information in your positions and trade history

### Do you offer reporting on the trades done with multiple market makers?

The reporting is provided on demand in CSV or daily and monthly in PDF

### What if I wish to execute a trade only with one market maker?

You can do that either through restricting trading with other counterparties or limiting trades per asset&#x20;


# Firm Order Book

No "Last Look"

### What is a firm order?

It is an order that is not subject to cancellation or alternatively “no last look”. In simple terms, it's the level that the market maker will provide liquidity to a counterparty.&#x20;

### What is a last look?

"Last look" is a practice in financial trading where liquidity providers can review and potentially reject a trade before it's executed.

### Why "no last look" is beneficial for me?

Since the order is not subject to rejection, you can predict the result of your execution. Thus, you are less likely to end up in an instance of a loss due to market moves.&#x20;

### How does Finery Markets differ from my current OMS (Order Router) or Multiple Integrations?

1. Finery Markets is cost-effective and has a better quality of execution compared to Multiple Direct Integrations. Maintaining multiple integrations results in high infrastructure and back-office costs. Liquidity providers also reserve the right for the “last look”, allowing them to reject orders at will.
2. OMS or Order Router rely on indicative quotes which don’t necessarily ensure predictable execution, leading to increased slippage. Moreover, the liquidity sources may reserve the right for the “last look”

Liquidity providers stream firm orders to Finery Markets and the platform acts as the execution venue. Finery Markets offers transparent & predictable execution across all liquidity providers with minimal slippage.

<figure><img src="/files/qa9G7PRxGPYrTnnMKGrk" alt=""><figcaption></figcaption></figure>


# Quote streams

## **What is Quote Streams (QS)?**

**Quote Stream** enables trading on non-firm (with last look) liquidity. Liquidity Providers stream indicative quotes for specific instruments to Takers and Masters via Finery Markets. In contrast to our Firm Liquidity pools, the execution occurs outside Finery Markets’ matching engine. These streams provide real-time market data updates and can be assigned to a specific client, a group of clients, or all clients (including new ones). Each stream is uniquely identified by a Stream ID. 

<figure><img src="/files/QWB4lM93ImYqoT6TjusB" alt=""><figcaption></figcaption></figure>

## How does a Quote Stream work?

* **Stream Setup**: LPs or bridge providers can create streams via API by choosing an instrument. The liquidity provider can make the stream available to all clients, unique client groups, or IDs. Only one stream is allowed per taker-instrument combination. Finery Markets Support can also set up streams manually. For assistance, contact <help@finerymarkets.com>.
* **Market Data**: LPs stream indicative quotes to the designated streams, which Takers subscribe to via WebSocket or FIX APIs. Quotes are delivered as snapshots of the order book, including bid and ask prices with corresponding sizes.
* **Order Execution**: Takers submit orders specifying execution rules (individual QS LP , all available QS LPs, or all available liquidity). Depending on the rule, a pre-matching process cross-references Risk Management parameters and compares quotes from multiple LPs and the firm book to determine the best execution price. Finery Markets selects the optimal liquidity source and routes the order to the external venue if it’s a QS LP.
* **Markups:** When QS LP streams to Master or Taker account types, markups don’t apply. Establish individual streams with markups. However, Master’s markup applies to sub-takers.

## **What is the difference between firm book and QS?**

In QS, the execution occurs on the LP's side. Last look and rejections may occur due to the architecture (especially during high market volatility).&#x20;

## **How does 'Best Price Available' mode works?**

Finery Markets uses a pre-matching process to ensure optimal execution:

1. Snapshots of the order book are gathered from multiple LPs
2. The weighted average execution prices are calculated for the requested order size per LP
3. The best Quote Stream (QS) liquidity is compared with the aggregated firm liquidity
4. If the aggregated firm liquidity is better, the order is executed in full through the firm book
5. If the firm book price is less competitive compared to the QS liquidity, the order is routed to the QS LP for full amount execution.

## **How do limit checks work?**

Market data is accessible upon establishing a connection and setting a trading limit. The market data is not subject to a credit check.

1. Potential trades, based on the best weighted average price and executed size, are first checked by Finery Markets’ Risk Management
2. If Risk Management rejects the potential trades, the order is not routed to the LP
3. If the potential trades pass all Risk Management checks, the required limit is blocked until the LP responds
4. LPs may apply additional limit checks
5. The limit is released upon the LP’s response, regardless of whether the order is executed or rejected.

## **What APIs are supported?**

Quote Streams supports WebSocket, REST, and FIX APIs for both Makers (LPs) and Takers. Makers use APIs to stream quotes and manage streams, while Takers use them to subscribe to market data and execute orders. The detailed API specifications are available in the API Reference section.

## Can QS connections be established via bridges?

Yes, bridge providers support FM’s QS API methods and can connect to Finery Markets on your behalf. To enable this integration, you’ll need to share your Finery Markets API keys with the bridge provider, which will manage the technical implementation.

Both maker and taker setups are supported, including streaming quotes, retrieving quotes, and placing and executing orders.

For detailed assistance and a list of supported providers, please contact us at <help@finerymarkets.com>.


# CEX trading

CEX Trading allows clients to connect exchange accounts and trade directly on centralized exchanges via GUI or API. Currently supported exchanges are Binance and Kraken (additional exchanges are available upon request).

Market data is streamed from the connected exchange via Quote Streams, and orders are routed for execution on the CEX using the client’s account. Orders are executed on the exchange if there is sufficient collateral.

### How to connect a CEX account

To enable CEX trading:

1. Contact the Finery Markets team
2. Provide your exchange API credentials
3. Whitelist FineryMarkets IPs (if applicable)
4. Complete the connection setup with the team

### How to place a CEX order

To place an order:

1. Go to Trading
2. Select an instrument available on your connected CEX
3. Select Source as Binance or Kraken&#x20;
4. Enter order size, type, and price (if applicable)
5. Place an Order

<figure><img src="/files/AhJ1czThYEQSUC5O6oQ5" alt=""><figcaption></figcaption></figure>

The order is sent to the exchange and executed using your CEX account.

### Supported order types

* Binance: Market IOC, Limit FOK, Limit IOC
* Kraken: Market IOC, Limit IOC

### Important notes

* Orders are executed on the CEX side using your own account and balances
* Market IOC orders are submitted to the exchange as Market GTC


# Synthetic pairs

Synthetic Orders (Synthetic Pairs) allow clients to trade instruments constructed from two existing instruments. The platform calculates prices in real time in the GUI using the best available prices from the firm order book.

When a synthetic order is placed, it is executed as two linked orders (legs) in the preconfigured order books. The parent order defines the size, price, and type, while both child orders inherit these parameters and are sent simultaneously to the market.<br>

### How to add a synthetic instrument

To create a synthetic instrument:

1. Go to 'Pricing & Instruments' (or 'Instruments')
2. Click 'Add new'
3. Choose two direct source instruments (e.g., ETH-USDT + BTC-USDT)
4. Review the synthetic price and formula preview
5. Click 'Create Instrument'

<figure><img src="/files/SvTsjgjVatipj1EwBUqv" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Synthetic instruments cannot be created from other synthetic instruments or if the instrument already exists.
{% endhint %}

### How to place a synthetic order

To place an order:

1. Go to Trading, click 'Search Instrument'
2. Select a synthetic instrument and add it to the trading page
3. In the order tile enter order size, type, liquidity source, and price (if applicable)
4. Place the order

<div><figure><img src="/files/DhUX56EG4xoi49elFVbx" alt=""><figcaption></figcaption></figure> <figure><img src="/files/o3jXa5IoR89ZQyy9fpOT" alt=""><figcaption></figcaption></figure></div>

Executed orders are available in History → Orders → Algo Orders.

<div><figure><img src="/files/wJ1GWdZVczimFp6XqDEe" alt=""><figcaption></figcaption></figure> <figure><img src="/files/L4OTkryPTzbCjnMhjmzo" alt=""><figcaption></figcaption></figure></div>

### API

Use the API to:

* [Create and get synthetic instruments](/api-reference/rest-api/pricing-and-instruments/synthetic-instruments)
* [Place synthetic (algo) orders](/api-reference/rest-api/trading/adding-orders/add-algo-synthetic-and-gtc-orders)
* [Retrieve order history and details](/api-reference/rest-api/trading/orders-and-order-book/algo-orders)

#### Important notes

* Supported order types: Market IOC, Market FOK, Limit IOC, Limit FOK

  (Pending limit orders will be supported later)
* Execution is not guaranteed. Slippage risk applies, including cases where one leg is filled and the other is partially filled or not filled
* If one leg cannot be executed due to liquidity or source limitations, the order is declined
* Markups apply only to the underlying direct instruments; no separate markup is applied to synthetic pairs


# Pending Limit Orders (GTC)

A Pending Limit Order allows takers, sub-takers or masters (on behalf of a client) to place orders at a specific price, even if the orders are not immediately executable. This is a Good 'til canceled (GTC) type of an order.&#x20;

The order remains active until it is either fully executed or cancelled by the client. When placing the order, the trader specifies a limit price, which acts as a guideline—serving as a maximum for buys or a minimum for sells. However, this limit serves only as a reference: the trade may be completed at a better  price. If a better market price is available at the time of order creation, the order will be executed immediately. This approach allows the client to benefit from better market conditions while complying with the defined parameters.

### How to use

To place a Pending Limit Order, navigate to Trading -> Order Book and enter the size and desired price. While risk management checks are not applied when the GTC order is placed, all orders associated with its execution will be subject to the applicable risk management rules.

<figure><img src="/files/WLlzG6WapLpjv4ZIz3zM" alt=""><figcaption></figcaption></figure>

Open orders, including non-executed or partially executed ones, can be found in the Orders Widget on the trading page.

<figure><img src="/files/IwCHosort1M3TbMefgYV" alt="" width="375"><figcaption></figcaption></figure>

Each GTC order has a breakdown of the orders involved in the execution process

<figure><img src="/files/Xh3VZSlH5Yuqf0thlkVJ" alt="" width="375"><figcaption></figcaption></figure>

A dedicated Pending Orders Table is available under History -> Orders -> PLO, displaying real-time statuses such as Open, Filled, and Canceled. This provides users with a clear and organized view of all pending orders.

<figure><img src="/files/t1kJypzkIbuxGjL8DOxB" alt=""><figcaption></figcaption></figure>

To place or manage Pending Limit Orders, please refer to our [API](/api-reference/rest-api/trading/orders-and-order-book/pending-limit-orders).


# RFQ

Trade using RFQ with select liquidity providers

## What is RFQ?&#x20;

RFQ stands for Request for Quote. A trader submits an RFQ to the LP or LPs, specifying the asset, quantity, and trade direction. A master may submit RFQs on behalf of a client. The dealer responds with the execution price for the order.

RFQs are typically valid for only a few seconds, with more volatile assets having shorter validity periods.&#x20;

## What is the difference between an RFQ and an Aggregated Order Book?

In short, the formats complement each other: standardized trades are executed in the Aggregated Order Book, while less liquid pairs or bulk trades are traded in the RFQ format.

Please refer to the table below for a detailed answer

<table><thead><tr><th width="249">Question</th><th>Aggregated Order Book</th><th>RFQ</th></tr></thead><tbody><tr><td>Where is the trade executed?</td><td>In the matching engine of Finery Markets</td><td>In the matching engine of the liquidity provider</td></tr><tr><td>What would the price feed look like?</td><td>Firm book mode offers continuous pricing from various liquidity providers via GUI, REST, WS and FIX</td><td>RFQ offers on-demand pricing for a particular pair via GUI and WS</td></tr><tr><td>Is it a firm liquidity (no last look) ?</td><td>Yes</td><td>No</td></tr><tr><td>Can the trade be split between two or more liquidity providers?</td><td>Yes, to attain the best weighted average price of execution</td><td>No, you will have to choose the best price </td></tr><tr><td>Can I lock the price for a select period of time?</td><td>Once you place an order, the trade is executed and cannot be canceled</td><td>Yes, you will have 5 seconds to accept the prices offered by the liquidity providers.</td></tr></tbody></table>

## Do all of the Liquidity Providers offer RFQ?

Trading using RFQ is available with select liquidity providers.

## How do I enable RFQ Trading in my account?&#x20;

Setting up a trading limit on Finery Markets requires guidance from the customer support team. The liquidity provider or providers of choice will setup a separate instance to Finery Markets. This instance will be linked to your Master or Taker account.

Please send an email to <help@finerymarkets.com> if you wish to trade using RFQ.&#x20;

## Where can I find RFQ?

The switch is located at the top of the trading screen. If the RFQ was set by customer support team, you will have RFQ available next to the Order Book section.

<figure><img src="/files/0pCOypZm2jR0UEx1PPyS" alt=""><figcaption></figcaption></figure>

## How do limits work for RFQ trading?

Risk management in Finery Markets applies to trades executed via RFQ. Internal limit checks are performed before those of the external provider. Quotes for the requested size will be displayed even if the order exceeds the limit.

## How do I make a trade using RFQ?

Firstly, refer to the RFQ section at the top of the screen. Secondly, add new instruments you wish to trade

<figure><img src="/files/GJZX4ikffakoojDONV9t" alt=""><figcaption></figcaption></figure>

&#x20;Thirdly, specify the amount in the base currency of the instrument and select the side

<figure><img src="/files/7AF8ulgsrIo8hggUQlRZ" alt=""><figcaption></figcaption></figure>

Upon selecting the side by clicking on BUY or SELL, you will be presented with the prices offered by the Liquidity Providers. The best available price will be highlighted

<figure><img src="/files/8Bsx7vPGgbjriZ8ECh4l" alt=""><figcaption></figcaption></figure>

You will have 5 seconds to secure the price. After 5 seconds the price will be refreshed automatically. To accept the price, click on one of them once. In case the trade was unsuccessful, you will see an error message at the bottom left corner

## Do the markups apply for the sub-accounts?

Yes, markups will be applied to trades between the Master and its sub-accounts.

## Which API endpoint should I use to trade using RFQ?&#x20;

Trading is available via WS connection, post-trade and pre-trade requests can be established using REST methods.

### To retrieve settings, list of available providers, and request trade history please utilize the following methods

{% content-ref url="/pages/07HarDFwoKJ9Akje4F6T" %}
[getSettings](/api-reference/rest-api/trading/rfq/getsettings)
{% endcontent-ref %}

{% content-ref url="/pages/HY554WluLgIDtIpxlkvt" %}
[getProviders](/api-reference/rest-api/trading/rfq/getproviders)
{% endcontent-ref %}

{% content-ref url="/pages/aH1KX3KNvzRN5EgziKPl" %}
[getSessions](/api-reference/rest-api/trading/rfq/getsessions)
{% endcontent-ref %}

### To trade, please refer to the methods below

Getting quotes, sending requests, and commits are available via the Websocket API:

{% content-ref url="/pages/BPmYmx61vLiNrHPaKbnD" %}
[RFQ](/api-reference/websocket-api/rfq)
{% endcontent-ref %}


# Toxic Flow Protection

Alternatively "Speed Bump" or "Latency-Floor"

### Finery Markets requires liquidity providers to stream firm orders; is there any protection against HFT or Toxic Flow?

Yes, there is. Under our operating rules, all orders coming from Takers are considered to be aggressive. These include MarketFOK, MarketIOC, LimitFOK, and LimitIOC. There is a latency floor for these order types.

### How does the latency floor work?&#x20;

All aggressive orders are delayed by 100 milliseconds.

### Can I have multiple price streams within Finery Markets?

Yes, you have two options:

1. Establish several price streams for different client groups and display them accordingly.
2. Run a single price stream and use the Finery Markets [markup management tool](/product-features/trading/markups) to create multiple price streams at the client level within Finery Markets.


# Market Data (view-only)

Clients of Finery Markets can share view-only Market Data between Maker, Taker, Master and sub-Taker account types. View-only Market Data is independent of  enabling  trading therefore, can be enabled before the completion of the KYB. View-only Market Data is not subject to the credit check (i.e. trading gross limit).&#x20;

{% tabs %}
{% tab title="For Takers and Masters" %}
**How can I access the view-only Market Data?**

Once the LP approves your connection request, they can switch on the view-only market data, even if you are still onboarding.

1. You will receive a platform notification and an email once the LP grants you a view-only access
2. Navigate to the Trading page.
3. Add an instrument tile (e.g., `BTC-USDT`). You can now see their view-only Market Data in the Liquidity Sources widget.
4. Click the "Source" in the tile,  select the new LP from the list. You can see the prices for the selected size or amount.
5. You may add multiple tiles of the *same instrument* to compare market data from different LPs. For example, set one tile to "Aggregated book" and a second tile to the view-only LP, then place them side-by-side.

<figure><img src="/files/enk3eyjPgQHTK72fiNJV" alt=""><figcaption></figcaption></figure>

* Source Labels:
  * Grey label: "View-only market data. Trading not enabled by LP."
  * Blue label: "Market data available. Trading enabled by LP."
  * "Market Data is not available": The LP has not enabled trading or view-only market data access.
    {% endtab %}

{% tab title="For Liquidity Providers (LPs)" %}
**How to enable View-Only Market Data**

You have full control over sharing market data with clients, when their trading is not yet enabled.

1. Navigate to the Risk Management page.
2. Find the client connection and click "Edit".
3. Go to the "Market data and markups" section.
4. Activate the toggle: "Show view-only market data when trading is not enabled".

<figure><img src="/files/yeJr1Jz6nFNd91gRQOVT" alt=""><figcaption></figcaption></figure>

**Key Takeaways**

* This toggle is specifically for sharing data when trading is disabled.
* If trading is *already enabled* for a client, their market data is shared by default.
* You can revoke this view-only access at any time by disabling the same toggle. The client will lose access to the prices if trading is also disabled.
  {% endtab %}
  {% endtabs %}

## Which API method should I use to subscribe to the Market Data?&#x20;

Master Account and Taker account can access view-only Market Data using the following method

{% content-ref url="/pages/SW2ZrjnmvAx3X7e86X7E" %}
[Feed 'MD' - View-only Firm Market data](/api-reference/websocket-api/feed-md-view-only-firm-market-data)
{% endcontent-ref %}

If you intend to utilize your existing WS, FIX, or REST integration, you may acquire a Master account and create a sub-Taker account. By enabling the view-only Market Data feature for the sub-Taker, the Master will share the view-only Market Data through one of these methods

{% content-ref url="/pages/PqMFL1aegwGCHgWoKwmv" %}
[Feed 'F' - Firm Market Data](/api-reference/websocket-api/feed-f-firm-market-data)
{% endcontent-ref %}

{% content-ref url="/pages/aHNraEmEbbTuVE9xNbhp" %}
[Market Data](/api-reference/fix-api/market-data)
{% endcontent-ref %}

{% content-ref url="/pages/KGixTxfDw51J82MQ1xrB" %}
[book](/api-reference/rest-api/trading/orders-and-order-book/book)
{% endcontent-ref %}


# Markups

This article is for the Makers who wish to personalize their price stream per taker.

### Is it possible to have multiple price streams?

Yes, a maker can have multiple accounts to meet their needs. However, we offer a more convenient tool for providing different price streams per taker. A maker can control the spread using the markup feature available under the Assets & Instrument -> Markups tab.

Please keep in mind that the material in this article only applies to price streams from a Maker to a Taker. If you are a Master streaming your own liquidity and at the same time reselling liquidity from other Makers, please refer to the ["How to set up a markup" section of the Master Accounts](/overview/about-our-products/fm-liquidity-match/master-account#how-do-i-set-up-a-markup-for-the-sub-account) page.

### How do I set up a markup per taker?

<figure><img src="/files/gxNyFf0FTVdJ4GFSD0h7" alt=""><figcaption><p>Adding trading markup from the Maker GUI</p></figcaption></figure>

1. Go to  Assets & Instrument -> Markups tab.
2. Click 'Configure'
3. Select Takers you wish to set up markup for (all are selected by default)
4. Chose between Default markup and Markup per Instrument.
5. For **Default markup** input the value in %. For example, to implement a 4 bps markup you would need to type in 0.04

<figure><img src="/files/ovfJJPLYt5aqB77XhhS1" alt=""><figcaption></figcaption></figure>

### Can I set different markups for different instruments?

Yes. In order to do so, please follow these steps:

1. Go to  Assets & Instrument -> Markups tab.
2. Click 'Configure'
3. Select Takers you wish to set up markup for (all are selected by default)
4. Choose **Markup per Instrument**
5. Select one or more instruments (all are selected by default)
6. Enable instrument markups
7. If you wish to set up different markups for bid and ask, tick the respective box
8. Set up the markup
9. Click "Apply"

<div><figure><img src="/files/lzGs29SoWayLjzHEDBub" alt=""><figcaption></figcaption></figure> <figure><img src="/files/OizLrTnuNIqr8AWxCU1W" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Use default markup for broad consistency, and instrument markup for precise control over specific pairs to meet unique trading needs.

**Default markup** is a standard rate applied to all trading pairs, ensuring consistent markups across all pairs, including new ones. This rate can be zero or even negative.

Enable **Instrument markup** to set custom rates for specific instruments, **overriding** the default markup. You can tailor different bid and ask quotes for individual instruments or groups like fiat<>crypto.
{% endhint %}


# Liquidity pools

Configuring custom liquidity sources

### Can I manage access to liquidity sources at the sub-account level?

Yes, a master user can configure a custom liquidity pool for each sub-account, with the option to blacklist specific LPs, sub-makers, or the master’s own liquidity.

### How do I set up a custom liquidity pool for a sub-taker?

<figure><img src="/files/mPzMZeSYE4W7rbpg1Y7m" alt=""><figcaption><p>Configuring a custom liquidity pool for a sub-taker</p></figcaption></figure>

1. Navigate to **Risk Management**
2. Select the **taker’s sub-account**
3. Click **Edit**
4. Open the **Liquidity Pool** tab
5. Enable or disable liquidity sources to define the custom pool

<figure><img src="/files/E8BTmBnHvQvE9kYrcrb0" alt=""><figcaption></figcaption></figure>


# Authorized trading

## The Authorized Trading feature allows Masters to execute trades on behalf of their clients (sub-accounts) using the FM platform using the GUI or API.&#x20;

### Use-cases:

1. Voice-Trading
2. Trading within your Master account

### How-to use

1. Go to 'Trading'
2. Click on the 'Operating as ... ' drop-down menu

<figure><img src="/files/yIElddpc95ziUrd3NPBP" alt=""><figcaption></figcaption></figure>

3. Search for the instrument you need to trade

<figure><img src="/files/snO3LFsInrtiH7NAtMJk" alt=""><figcaption></figcaption></figure>

4. You will see the order books from the sub-account's perspective. This will account for the limits set against the sub-account, markups and other Risk Management settings. Available order book will contain all of the active external LPs and the liquidity streamed via API

<figure><img src="/files/mDJSWFdrUXqgRWfChfwh" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can access the order book through Feed F using Master API keys. Upon subscribing, specify the sub-account ID
{% endhint %}

5. Execute the trade on behalf of the client by double-clicking on Buy or Sell&#x20;

<figure><img src="/files/izQCFmXKP9ILQpBWQbI6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you wish to specify the liquidity source for the trade, select the LPs in the 'CP enabled' widget in the top right corner.
{% endhint %}


# Non-Deliverable Trading

Alternatively, the Roll-Over fee

<figure><img src="/files/f9xYpoMMUR3TvzGB531J" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="For Takers" %}

## Benefit from OTC liquidity, without ever holding custody of it - or trade now and settle later.

### What is a non-deliverable?

Non-deliverable solution on Finery Markets is an extra layer built over our spot trading (roll-over). It brings the best of both worlds: deep, firm liquidity with zero rejection rates, quote streams and the ability to roll positions to the following trading days.

### What are the best use cases for this feature?

It depends on what application aligns with your business model:

<mark style="background-color:green;">Your solution lacks crypto withdrawal functionality, or you lack the infrastructure for crypto custody:</mark>

You can trade all pairs available on the platform without the need for bilateral settlement or receiving crypto as your part of the settlement. Since your customers generate the two-way flow, you can continuously roll positions. Ultimately, you would only need to top up your account if your equity drops below the margin requirements set by your market maker.

*<mark style="background-color:green;">You wish to postpone the settlement for another day while trading OTC</mark>*<mark style="background-color:green;">:</mark>

You can do so quite easily. However, please note that there will be a fee associated with this service. Settlement can then be completed on the next or subsequent trading day.

### Why would I need non-deliverable trading?

<mark style="background-color:green;">Depending on your business model, you may save money on:</mark>

a.    Blockchain and settlement fees

b.    Custody fees

c.    Treasury management

<mark style="background-color:green;">Or add new features to your internal processes:</mark>

d.    Introduce or move CFDs and Derivative trading to Finery Markets

e.    Streamline your operations with treasury if your clients don’t require actual settlement in crypto

f.   Utilize the internal inventory, while enjoying the advantages of 0 to 30% prefunding with liquidity providers, to expedite the settlement process with your customers.

### What if I don’t always need non-deliverable trading, but rather wish to roll my open positions for a day or two?

Of course you may. There are no binding terms for this feature. It can be used on demand.

### How do I engage in non-deliverable trading?

<mark style="background-color:green;">You have 2 options:</mark>

a. Continue trading in the same environment without any adjustments.

b. Ask our support team to issue you a separate account for your non-deliverable trading.

### How do you calculate the fees?

The overnight cost is applicable only to negative open positions. A deduction is calculated based on a snapshot of open positions at 00:00 UTC time every day.&#x20;

The value is expressed in percentage per annum (APR) in the 'Assets' section. In simple terms, if you see a rate of 10% APR, it is divided by 365 days in the calendar year. This represents your charge for rolling over your position. Finery Markets will notify you via email if the rate is set or changed against you.

Finery Markets calculates the roll-over and generates a corresponding settlement order, which will adjust your open position.

### How do I know that non-deliverable trading is activated by my liquidity provider?

Login to Finery Markets and open ‘Assets and Instruments’. If you see values other than 0 in the "Overnights" column, you can roll your positions.

### How will it work?

If you roll over your position after 00:00 UTC, your negative open position (shown in red) will increase. For instance, if you were to settle on T+0 (the same day), you would owe 10 USD for your crypto. By rolling the position over to the next trading day, you now owe 10.1 USD for the same amount of crypto. You can find the charge under the 'History' → 'Settlements' section, 'Technical' tab:

<figure><img src="/files/U34sO4b2GfE44lGAdK5A" alt=""><figcaption></figcaption></figure>

### If I settle, will it impact my older open positions first or the newest?

It will apply to the overall open position, thereby decreasing the overall value to which the fee is applied.

### What is an APR?

It is the interest rate for a whole year, rather than just a monthly fee/rate.

### What is the average APR for assets?

It depends on the liquidity provider and market conditions.

### How will I be notified of the charges?

You will be notified by email; we use the email that your account is linked to.
{% endtab %}

{% tab title="For Liquidity Providers (LP)" %}

### What is a non-deliverable?

Non-deliverable solution on Finery Markets is an extra layer built over our spot trading (roll-over). Our system can automatically deduct necessary fees for rolling positions.

### What are the best use cases for this feature?

a.    If you wish to offer an extension to your OTC offering

b.    If you wish to impose settlement hygiene

c.    If you wish to pay interest for the assets your taker is holding with you&#x20;

### How do I enable non-deliverable trading?

a.    Continue trading in the same environment and specify the APR in the Assets tab

b.    Ask our support team to issue you a separate account for your non-deliverable trading&#x20;

### How do I enable non-deliverable trading for Takers?

Control over this feature is located under the Assets section. You may set the fee per coin, which will apply to all takers, or set it per taker.

#### To apply the rate for all takers, follow these steps

1\.    Go to Assets & Instruments

2\.    Click on the coin or currency you wish to charge a fee&#x20;

3\.    Click on the Default overnight rate on the right-hand side

4\.    Input the value in APR in the Negative overnight rate section if you wish to charge your taker for rolling a position. For example, if they bought one BTC for EUR, the negative rate for EUR will increase the amount they owe you for that one BTC.

5\.    You may input the Positive overnight rate if you wish to pay the interest for the assets the Taker holds with you

#### To apply the rate per  taker, follow these steps

1\.    Go to Assets & Instruments

2\.    Click on the coin or currency you wish to charge a fee&#x20;

3\.    From a drop-down menu select the Taker

4\.    Click on the Specific overnight rate, % rate on the right-hand side

5\.    Input the value in APR in the Negative overnight rate section if you wish to charge your taker for rolling a position. For example, if they bought one BTC for EUR, the negative rate for EUR will increase the amount they owe you for that one BTC.

6\.    You may input the Positive overnight rate if you wish to pay the interest for the assets the Taker holds with you

### How do you calculate the fees?

A deduction is calculated based on a snapshot of open positions at 00:00 UTC time every day.&#x20;

The value is stated in percent per annum (APR) in ‘Assets’. In other words, if you input 10% APR, it is divided by 365 days in the calendar year. This is the payment you will receive for the rolling position.&#x20;

Finery Markets calculates the roll-over and creates a respective settlement order, which will change the open positions.

### How will it work?

If the taker rolls a position over 00:00 UTC, your positive open position (in black) will increase. For example, if they were to settle in T+0 (the same day), they would have owed 10 USD for the crypto. If they have rolled the position onto the next trading day, they would owe 10.1 USD for the same amount of crypto. The charge can be found under the Settlement section, Technical tab.&#x20;

#### Do settlements impact older open positions first or the newest?

It will apply to the overall open position, thus decreasing the overall value to which the fee is applied.

### Do you notify takers of the changes to the APR?

Yes, we notify their authorized emails the moment you set the rate&#x20;
{% endtab %}
{% endtabs %}

## What if I want to dispute the applied fee for the service?

Please send an email to <help@finerymarkets.com> or reach out to Egor Morozov through Telegram @gregg\_m or via email <em@finerymarkets.com>


# Voice Trading

Reserved for Market Makers. Book the trades performed over the phone, chat and the like.

<figure><img src="/files/7Ise3rLwE2OcEnVRWuMh" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/zAGutGFdsQMUm7H9OUaU" alt="" width="563"><figcaption></figcaption></figure>

### Why would I need Voice Trading?

This feature is designed to register trades performed in a non-electronic manner. It is useful for consolidating all settlements and trade history in one interface. The trades will be reflected in your trading and settlement history, as well as in PDF reports.

1. Click “Orders”
2. Add New Order
3. Select 'Voice Trade' in 'Type' field
4. Input the counterparty's ID. You can find it in the 'Risk management' section
5. Select the instrument used in the trade
6. Specify the price of the asset
7. Specify the amount of assets traded at this price
8. Press 'Buy' if you have bought the asset from the counterparty, or 'Sell' if you have sold the asset to the counterparty

### Does the Taker need to increase the limit if the trade exceeds it?

Yes, both the global and the counterparty limits will be checked.


# Interdealer Trading

The market structure within the FM platform is based on distinct customer roles. Liquidity Takers, who are the customers, do not trade directly with each other. Instead, they only trade with Maker or Master accounts. On the other hand, Maker and Master accounts can trade both with Liquidity Takers and with each other. When Makers trade with each other or with Master accounts acting as Makers, these trades are categorized as interdealer trades.

The term *interdealer trades* refers to trades made between two users who act as Makers on the Finery Markets platform. In simpler terms, these trades occur between two Makers, where one user acts as the Liquidity Taker (who would otherwise be a Maker) and the other acts as a Maker, either through a Maker account or a Master account. Finery Markets encourages Makers to trade with each other and with Master accounts by offering economic incentives (refer to the [Tariff Policy](https://finerymarkets.com/tariffpolicy.html) for more details).

Examples of all possible trade scenarios on the FM platform are provided in the table below. You may need them to determine the trade type (interdealer or non-interdealer).

**Table 1. "Types of trading".**

| Scenario №  | Maker                     | Taker                                                                         | Inter-dealer trade |
| ----------- | ------------------------- | ----------------------------------------------------------------------------- | ------------------ |
| <p><br></p> | **Master A**              | <p><br></p>                                                                   |                    |
| 1           | Master A                  | Sub-taker of Master A                                                         | <p><br></p>        |
| 2           | Master A                  | Taker B                                                                       | <p><br></p>        |
| 3           | Master A                  | Own sub-taker of Master E if Master E also acts as a Maker                    |                    |
| 3.1         | Master A                  | Other sub-takers of Master E                                                  | <p><br></p>        |
| 4           | Master A                  | <p>Sub-taker of Master B  if Master B doesn’t act as a Maker</p><p><br></p>   | <p><br></p>        |
| 5           | Master A                  | Taker account of Maker D                                                      | Yes                |
| 6           | Master A                  | Sub-taker of Master A, if this sub-taker also acts as a Maker                 |                    |
| <p><br></p> | **Sub-maker of Master A** | <p><br></p>                                                                   |                    |
| 7           | Sub-maker of Master A     | Sub-taker A                                                                   | <p><br></p>        |
| 8           | Sub-maker of Master A     | Taker B                                                                       | <p><br></p>        |
| 9           | Sub-maker of Master A     | <p>Own sub-taker of Master E, if Master E also acts as a Maker</p><p><br></p> |                    |
| 9.1         | Sub-maker of Master A     | <p>Other sub-takers Master E, if Master E also acts as a Maker</p><p><br></p> | <p><br></p>        |
| 10          | Sub-maker of Master A     | Own sub-taker of Master B if Master B doesn’t act as a Maker                  | <p><br></p>        |
| 10.1        | Sub-maker of Master A     | Other sub-takers of Master B if Master B doesn’t act as a Maker               | <p><br></p>        |
| 11          | Sub-maker of Master A     | Taker account of Maker D                                                      |                    |
| 12          | Sub-maker of Master A     | Sub-taker of Master A, if this sub-taker also acts as a Maker.                |                    |
| 13          | Sub-maker of Master A     | Sub-taker of Master B, if this sub-taker also acts as a Maker.                |                    |
| <p><br></p> | **Maker C**               | <p><br></p>                                                                   | <p><br></p>        |
| 13          | Maker C                   | Taker B                                                                       | <p><br></p>        |
| 14          | Maker C                   | Own sub-taker of Master A if Master A also acts as a Maker                    |                    |
| 14.1        | Maker C                   | Other sub-takers of Master A, if Master A also acts as a Maker                | <p><br></p>        |
| 15          | Maker C                   | Own sub-taker of Master B, if Master B doesn’t act as a Maker                 | <p><br></p>        |
| 15.1        | Maker C                   | Other sub-takers of Master B if Master B doesn’t act as a Maker               | <p><br></p>        |
| 16          | Maker C                   | Taker account of Maker D                                                      | Yes                |
| 17          | Maker C                   | Sub-taker of Master A, if this sub-taker also acts as a Maker.                |                    |


# Position Management

<figure><img src="/files/RKmMTCfrymgzMIA4gtw6" alt=""><figcaption></figcaption></figure>

### 1. How do you account open positions?

We account the open positions per asset (not per pair). \
For every asset we keep track of three position values:

* Current position
* Max reachable position
* Min reachable position

### 2.     What do the assets in red mean?

The asset in red indicates a short position, meaning that you owe “X” amount to your counterparty

### 3.     What do the assets in black mean?

The asset in black indicates a long position, meaning that your connection owes you “Y” amount

### 4.     What is “Current”?

The "Current" column is the current value of each of your open positions (as well as the subtotals by counterparty and grand total at the top of the list) in USD.&#x20;

As USD is the base currency of our platform, the value of assets you hold is reassessed against USD every 15 minutes. For instance, if you hold BTC as collateral, its value may fluctuate throughout the day to maintain the limit in USD. Consequently, your liquidity provider and the system may request you to top up the account.

On the screenshot above,

**#4** points to the standing amount of one asset with a given counterparty (CP). As you can see, it has two values:

* The amount of the asset itself (e.g. BTC) - it doesn't change as the market moves
* One is the asset's mark-to-market USD value

**#5** points to a subtotal of all positions vs a CP (calculated as the arithmetic sum of all your long and short positions with this CP valued in USD)&#x20;

### 5.     What is “Max/Min reachable position”?

It represents the maximum/minimum position, taking into account uncommitted settlement transactions.

Example: The current position is 0 BTC. You have an incoming uncommitted settlement transaction for 10 BTC and an outgoing uncommitted settlement transaction for 5 BTC.

• If the incoming transaction is committed, the position becomes 0 BTC - 10 BTC = -10 BTC. Thus, the minimum reachable position is -10 BTC.

• If the outgoing transaction is committed, the position becomes 0 BTC + 5 BTC = 5 BTC. Thus, the maximum reachable position is 5 BTC.

The planned position takes into account all pending settlement transactions and is equal to:&#x20;

0 BTC - 10 BTC + 5 BTC = -5 BTC.

### 6.     What is “Price” and why is it changing?

"Price" is the mark-to-market value of the asset at any given moment.

### 7.     What is “Overnight”?

"Overnight" is the overnight rate you are expected to pay for rolling your positions over. It is denominated in:

* Interest paid in USD (daily rate)
* APR %

<mark style="background-color:blue;">Example:</mark> you are rolling a position worth $8000. The APR for this asset is 12%. In this case, the daily rate will be calculated as (8000 \* 12%) / 365 = $2.63

Please refer to [Non-Deliverable Trading](/product-features/trading/non-deliverable-trading) to learn more.

### 8.  What is "Planned"?

Unlike ‘Current,’ the value in the ‘Planned’ column takes into account uncommitted pending [settlement](/product-features/settlements) transactions. It can be calculated as:

`Planned = maxReachablePosition + minReachablePosition - Current.`

### 9.  What is the upward arrow for?

Click it to settle the selected asset with your counterparty. A "Create transaction" pop-up will appear; you will also be taken to the Settlement Transactions interface.


# Settlements

Streamline your back office with our settlement messenger. Register incoming transactions and create requests with a click of a button. We will take your back office to the next level.

### Where do I find the settlements functionality?

The 'Settlement' section is located in the menu on the left.

<figure><img src="/files/C4LOLD6dUWBm98vMedR5" alt=""><figcaption></figcaption></figure>

In this section, you will find:

* **Incoming Transactions:** Settlements that are coming your way, which can be considered as deposits to your accounts.
* **Outgoing Transactions:** Settlements that you have made towards another counterparty, which can be considered as outgoing payments.
* **Requests:** A list of your pending requests for incoming transactions and received requests for outgoing transactions.

You may sort them by assets, counterparties, and the status of the settlement.

### How do I settle my open position?

If you wish to settle (create an outgoing settlement transaction), you have 2 options:

#### Settling the whole position

1. Go to the 'Positions' tab and locate the asset you wish to settle. Liabilities are highlighted in red.
2. Press the upward arrow next to the asset.
3. This will open a prefilled pop-up with the amount to be sent and the network. Keep in mind that the recipient receives the exact amount stated in the pop-up.
4. Send the wire or blockchain transfer to the account or wallet listed in the address book.
5. Once the wire or blockchain transfer is made, press 'Create and continue'.
6. Retrieve the reference number of the wire or the hash (TX ID) of the transfer.
7. Paste it into the 'Enter TX ID to commit the transaction' section.
8. Press 'Send Transaction'.

#### Partially settling the position or prefunding a trade

1. Go to the 'Settlements' section
2. Press 'Create'
3. Select the name of your connection
4. Select the asset you are sending
5. Specify the amount
6. Tick the 'Fee paid by recipient' if this applies
7. Press 'Create transaction'
8. Perform the wire or a blockchain transfer to the counterparty
9. Retrieve the reference number of the wire or the hash (TX ID) of the transfer
10. Paste it into the 'Enter TX ID to commit the transaction' section
11. Press 'Send Transaction'.

### How do I request the assets?

#### Settling the whole position

1. Go to the 'Positions' tab and locate the asset you wish to withdraw. Items up for request are highlighted in black.
2. Press the upward arrow next to the asset.
3. In the pop-up, navigate to the 'Send' section.
4. Validate the amounts and networks.
5. Press 'Create transaction'. \*&#x20;

\*Note that in the event that a counterparty does not complete your request within 7 calendar days, it will automatically expire.

**Requesting everything available per asset class:**

1. Go to the 'Settlements' section
2. Press 'Create'
3. In the pop-up, select the connection
4. Click the 'Request' tab.
5. Choose the asset you are requesting.
6. Specify the amount, or leave it empty to request everything available.
7. Select the network on which you wish to receive funds.
8. Press 'Create transaction'

### What are the statuses?&#x20;

The system has six statuses:

1. **Created** - You have initiated a settlement but haven't filled in all the required parameters to complete the action.
2. **Sent** - The funds are being sent.
3. **Received** - The funds are on the way to your wallet or bank account.
4. **Committed** - You have validated that the funds have landed in your wallet or bank account.
5. **Request** - The request for withdrawal has been recorded.
6. **Canceled** - The operation has been canceled by the counterparty or by you.

### Where can I find my previous settlements?&#x20;

You may find them in the 'Settlements' section → 'All' tab. Alternatively, in the 'History' section → 'Settlements' tab.&#x20;

### Is there a way to automate my settlements?

Yes, please refer to the [next article](/product-features/settlements/automated-settlements).


# Automated Settlements

### Do you offer automated settlements?

Yes. Finery Markets provides the infrastructure required to automate post-trade settlement. The seamless way to enable automation is by using the[ Fireblocks integration](/product-features/settlements/fireblocks), which connects Finery Markets and Fireblocks work environments. It supports auto-commit flow based on Fireblocks’ blockchain-verified transaction statuses.

You may also use any other custody provider. FM’s API can deliver the settlement data and instructions needed to communicate with a third-party custodian, including crypto custodians and banks that support API-based fiat transfers.

### Do I need to settle every trade?

No, you can have open positions for a trading day or more.

### How would I use API to settle my open positions?

*For example:*

1. Make a [Positions](/api-reference/rest-api/deals-and-positions/positions) API request to fetch your current positions
2. The retrieved table shows what you owe to LP and what the LP owes you. For example, you owe 0.004 BTC, FM-Test-MM owes you 173 USDCP
3. Settle your side first
4. Then, [add an outgoing transaction](/api-reference/rest-api/settlements/addoutgoingsettlementtransaction); insert data from Positions (step 1) there (counterparty ID, currency, size (must exactly match what the LP will receive) and send a request
5. In response, you receive transactionID, which must be saved to be inserted on one of the future steps
6. Your custody provider (for example, Fireblocks) performs a transfer according to the parameters from paragraph 6 to the liquidity provider (LP). Their wallets remain unchanged, and you receive their addresses after completing the onboarding
7. After Fireblocks has sent the crypto, it is important to collect the blockchain hash of the transfer
8. After receiving the crypto hash of the transfer you perform another command: [sendOutgoingSettlementTransaction](/api-reference/rest-api/settlements/sendsettlementtransaction)
9. In this command, you need to insert the hash from the Fireblocks transaction into the TXID field and "transactionId" from the response from paragraph 7
10. You create a request for the funds you wish to receive using [addIncomingSettlementRequest](/api-reference/rest-api/settlements/addincomingsettlementrequest), either specifying only the currency/asset (The LP will send everything that can be withdrawn) or specifying both the currency and the size
11. You will need to make requests to the [SettlementTransactions](/api-reference/rest-api/settlements/settlementtransactions) command. From it, you will see what is sent to you and what needs to be confirmed upon receiving it. It is available in the 'Incoming settlement transactions' section
12. Once the funds have landed in your accounts, you need to execute the [CommitIncomingSettlementTransaction](/api-reference/rest-api/settlements/commitincomingsettlementtransaction) command to commit.


# Fireblocks

### What problem does this integration solve?

Without integration, post-trade settlement requires manual transfer initiation, repeated data entry, and separate reconciliation across trading and custody systems. The integration replaces these manual steps with an automated workflow.

### What value does Fireblocks add?

* Automated post-trade settlements, including auto-commit flows between counterparties using Fireblocks on FM
* Single point of entry: settlement instructions are created directly on the FM platform based on FM position calculation

### What are the prerequisites?

Clients must meet the following conditions:

* Both counterparties have accounts with FM and Fireblocks
* The relevant asset and network are supported by Fireblocks
* Both counterparties are added to the FM profile in Fireblocks

### How is the setup completed?

Client A creates a connection using an FM profile ID:

* UAT: 981071d7-fc88-44ee-9565-97abf18ffcfa
* Prod: 8823b522-9725-49c0-ab2f-85cb72c86b72

Alternatively, the client can provide its Fireblocks profile ID and the FM team will initiate onboarding.

### How to settle via Fireblocks?

1. In the FM platform, **create a settlement transaction** for your Open Position

   <figure><img src="/files/kapq6sfp65XRNTemDn6h" alt="" width="563"><figcaption></figcaption></figure>
2. Select **Fireblocks** as the **settlement method**. This option appears only when:
   1. your Fireblocks setup on FM is complete
   2. your counterparty’s Fireblocks setup on FM is complete
   3. the asset and network are supported by Fireblocks
3. Click **'Create and Continue'**. FM will generate the FM transaction and create the corresponding Fireblocks transfer request in your Fireblocks workspace

   <figure><img src="/files/rS7RQydk4WPcggT5Yh5p" alt="" width="563"><figcaption></figcaption></figure>
4. **Go to your Fireblocks workspace** (Web Console or mobile app) and **fund** the transfer.

   If your workspace uses additional approval policies, complete the **approval** step as well

   <figure><img src="/files/bVkl8XBvHYHCTLmlzuNu" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/ddQFenR0wrmZKdiwAkaV" alt=""><figcaption></figcaption></figure>
5. Wait for Fireblocks to execute the transfer. Once the transaction receives blockchain confirmation, Fireblocks will update the transfer status to *Completed*
6. Check the transaction status on the FM platform. FM receives status updates from Fireblocks and will set the FM transaction to *Committed* once the transfer is finalized
7. Review updated NOP values. FM recalculates and updates Open Positions for both counterparties based on the committed settlement transactions

### Which API methods are available?

[Supported endpoints](/api-reference/rest-api/settlements/fireblocks) include:

* Settlement creation
* Deleting pending settlement instructions
* Transfer status retrieval


# Addresses

An easy way to manage your crypto addresses and bank details

<div><figure><img src="/files/wavfiXK38mwhUJaYtcgF" alt=""><figcaption><p>Crypto addresses</p></figcaption></figure> <figure><img src="/files/uTdq4gr3jRHFNIKtNL2n" alt=""><figcaption><p>Bank details</p></figcaption></figure></div>

**How to add?**

To add a new crypto address, first refer to the addresses section, then click on the 'Add & edit' button and select 'Crypto address.' Fill in the following details:

* Counterparty: The recipient or Counterparty associated with this address.
* Asset: Select the cryptocurrency asset.
* Network: If the asset has only one network, it will be prefilled.
* Your Address: Enter the respective crypto address.
* Private Note: Add any optional notes for your reference.
* Memo or Tag: If applicable for assets like XRP, XLM, or CRO, please fill in this field.

If you want to add the same crypto address to a group of clients, use the "Address for all CPs" option. This allows you to link the crypto address to all existing CPs or all existing sub-accounts.

<mark style="color:red;">**Important:**</mark> only an account **owner** can manage the addresses section. The rest of the team has view-only rights.&#x20;

<div><figure><img src="/files/uml2OWimXFZK75UJ269M" alt="" width="375"><figcaption><p>Crypto addresses</p></figcaption></figure> <figure><img src="/files/0gQzhoNLCptZU42Pts2P" alt="" width="375"><figcaption><p>Bank details</p></figcaption></figure></div>

**How to edit?**

To edit an existing crypto address, click on the 'Edit' icon next to the respective address and make the necessary changes.

<figure><img src="/files/1moJj1v4XtgYUuKQgDUv" alt=""><figcaption><p>How to locate the Edit icon</p></figcaption></figure>

In the pop-up window that appears, you can edit the address itself, its note or delete the address.

<figure><img src="/files/CALofQdtzMPALIjNskVn" alt=""><figcaption><p>Edit or delete the address</p></figcaption></figure>

<mark style="color:green;">**Useful tip:**</mark> In the 'Your addresses' tab, you can view, copy, and share the requisites of your crypto addresses. Simply click on the address line to open the detail view.

<figure><img src="/files/PESjLjTQ3gpsvw3aU30P" alt=""><figcaption><p>Connections' tab</p></figcaption></figure>

**How to verify and confirm your counterparty addresses?**&#x20;

In the "Connections' addresses" tab, you can verify addresses associated with other Counterparties and Sub-accounts. These can be crypto addresses linked to a CP or several CPs.

**Why should I confirm connections' addresses?**&#x20;

To stay informed about settlement instructions and any potential changes.

**Restrictions**

* Crypto addresses are linked to a CP or several CPs.
* You can add the same crypto address to a group of clients via the 'Address for all CPs' option.
* Bank accounts are available for every connected client, including sub-accounts and CPs.
* There is no option to add a bank account to a specific client.
* Only 'Owner' level users have the rights to add and edit addresses, while additional users can only view addresses.


# Analytics

FM Analytics helps you analyze your trading activity per counterparty

<figure><img src="/files/b8CmBr2YtDCs9719IRoQ" alt=""><figcaption></figcaption></figure>

#### Who can use Analytics?

Analytics is available to all client types, but some data cuts are role-specific.

#### What time periods can I analyze?

You can switch between predefined ranges or set your own:

1. Last 24 hours
2. Last 7 days
3. Last 30 days
4. Last 90 days
5. Custom date range: pick any start and end date in the past

#### How does Analytics help my liquidity distribution business grow more efficiently?

1. Analyze the turnover across the selected period
2. Track counterparty concentration
3. Track your  pocket share in takers' trading volume on Finery Markets, both in total and per asset. The pocket share is shown as a percentage representing your share relative to other liquidity providers
4. Review PnL (Markup Delta) by client and by instrument. PnL is calculated as the client fee — the sum of Deltas in USD — for the selected period
5. Asses Bid / Ask volume per instrument to understand client flow

#### How much of the taker's volume am I receiving on Finery Markets?

Turnover, counterparty concentration and pocket share help Makers and Masters analyze their flow. The grey line shows your pocket share as a percentage relative to other liquidity providers.

#### How do I analyze client trade direction?

You can view the Buy / Sell split (ratio or amount) per instrument. This helps you see how your clients are trading each instrument over the selected period.

#### How can I assess the performance of individual pairs?

Refer to the instruments section of the page to see how a pair is performing relative to other liquidity providers serving that counterparty.


# Control Center

This Help section is dedicated to features that are not directly related to the core functionality of the system, but rather to its operations and administration.

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td></td><td><a href="/pages/bCr2lzH91zekhXi7Ys1p">Multi-Roles</a></td><td></td></tr><tr><td></td><td><a href="/pages/sYQkhn7pDO2JPZ5iF738">Notifications</a></td><td></td></tr><tr><td></td><td><a href="/pages/3oYhEb2SLrlHSh5ukxqv">Reporting</a></td><td></td></tr><tr><td></td><td><a href="/pages/2cN3VWz1RmAZuBNJTWEz">Addresses</a></td><td></td></tr><tr><td></td><td><a href="/pages/6tWDcSZ5XPVZoytGA4wd">Bulk Edit</a></td><td></td></tr></tbody></table>


# Multi-Roles

Assign roles to your employees and control access to parts of the system

### Do you offer multi-roles for my account?

Yes, we do. It is available by clicking on your name in the top right corner and navigating to Users and Roles.

### How to add a new user to my account?

1. Click on your account name (top right-hand corner)
2. Click on "Users and Roles"
3. Click “Add new user”
4. Specify the user name and the email. Proceed by clicking on "Select permissions"
5. Select the permissions for the user
6. Click on "Create new user" &#x20;

### Which roles may I choose for the account?

You have the option to select roles available to your employee from the list. Keep in mind that you may select multiple roles and have the right to change them on demand.&#x20;

**View-mode** - the user will be able to view all the tabs on the platform. However, will be unable to perform any actions. This is a default option

**Trading** - the user will be able to execute trades

**Trading limits** - the user will be able to adjust and change trading limits

**Settlement operations** - the user will be able to view open positions and control the settlement process, including committing to transactions, creating them, and making requests for settlement

**API Keys** - provides the rights to issue new API keys for the account and delete current ones.

**User management** - will provide rights to add and delete users, and control existing ones, excluding your master account

### Is View Mode the default option?

Yes, it is. &#x20;

### What API methods each role has access to? <a href="#title-text" id="title-text"></a>

{% tabs %}
{% tab title="View Mode (Any user)" %}
Role name in API: **READ\_ONLY**

**Available methods for this role:**

* keys
* getUser
* getUsers
* dealHistory
* settlementHistory
* subaccountsSettlementHistory
* settlementTransactionHistory
* subaccountsSettlementTransactionHistory
* getClientData
* sendTakerInviteLink
* cancelInviteLink
* getInvitesList
* getSignatoryData
* book
* getUsername
* instruments
* climits
* cAssetLimits
* cShortSalesBan
* cSubaccountsShortSalesBan
* instrumentsWhitelist
* instrumentMarkups
* positions
* settlementRequests
* subaccountsSettlementRequests
* settlementTransactions
* subaccountsSettlementTransactions
* getSubaccounts
* subaccountsLimits
* subaccountsDealHistory
* subaccountsAssetLimits
* getClientType
* getCounterpartyInfo
  {% endtab %}

{% tab title="API keys" %}
Role name in API: **ALLOW\_API\_KEY\_MANAGEMENT**

**Available methods for this role:** everything in View Mode plus:

* addKey
* delKey
  {% endtab %}

{% tab title="User management" %}
Role name in API: **ALLOW\_USER\_MANAGEMENT**

**Available methods for this role:** everything in View Mode plus:

* addUser
* delUser
* updateUserAccessRights
  {% endtab %}

{% tab title="Trading" %}
Role name in API: **ALLOW\_TRADING**

**Available methods for this role:** everything in View Mode plus:

* add
* mod
* del
* delAll
* voiceTrade
* liquidationTrade
  {% endtab %}

{% tab title="Settlements" %}
Role name in API: **ALLOW\_SETTLEMENTS**

**Available methods for this role:** everything in View Mode plus:

* addIncomingSettlementRequest
* delIncomingSettlementRequest
* delIncomingSettlementCPRequest
* addOutgoingSettlementTransaction
* addIncomingSettlementTransaction
* sendOutgoingSettlementTransaction
* sendSettlementTransaction
* delOutgoingSettlementTransaction
* delSettlementTransaction
* commitIncomingSettlementTransaction
  {% endtab %}

{% tab title="Limits" %}
Role name in API: **ALLOW\_LIMITS\_MANAGEMENT**

**Available methods for this role:** everything in View Mode plus:

* setCLimit
* delCLimit
* setCAssetLimit
* delCAssetLimit
* setShortSalesBan
* delShortSalesBan
* enableTrading
* disableTrading
* setInstrumentsWhitelist
* enableInstrumentsWhitelist
* disableInstrumentsWhitelist
* addInstrumentMarkups
* delInstrumentMarkups
* setSubaccountLimit
* delSubaccountLimit
  {% endtab %}

{% tab title="Sub-accounts" %}
Role name in API: **ALLOW\_SUBACCOUNTS\_MANAGEMENT**

**Available methods for this role:** everything in View Mode plus:

* sendSubaccountInvite
* disableSubaccount
* enableSubaccount
  {% endtab %}
  {% endtabs %}

As you can see from the above, all roles also have access to all methods available to the "View Mode" access level.

### My employee needs to reset the 2FA or password, what should I do?

You would need to delete the user and then add them again.

<div><figure><img src="/files/E8H3Jic2yjmZyCEutoIu" alt=""><figcaption></figcaption></figure> <figure><img src="/files/ZXjCpojuZFLWaYmg0ews" alt=""><figcaption></figcaption></figure></div>

1. Open 'Settings' section -> 'Users and roles'
2. Find the employee who needs the reset
3. Click Edit
4. Press on the Bin Icon
5. Confirm the deletion
6. Add new user


# Notifications

Stay in touch with your account activity

<figure><img src="/files/CSYqOGlQCEVc6bs5lylz" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}

### Informative

{% endhint %}

Receive risk management, settlement and system related alerts to your account's web inbox or via email.

{% hint style="success" %}

### Personalized

{% endhint %}

Choose the alerts you find helpful to manage your account. If you use our multi-user setup, the settings are individual for each account (e.g., a notification and a channel can be configured individually)

{% hint style="success" %}

### Easy

{% endhint %}

Set it up by simply ticking a few boxes.

## How to get started

1. Log in to your account
2. Go to 'Settings'
3. Select 'Notifications' from the menu
4. Select the notifications you wish to receive

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Inbox</strong></td><td>Receive notifications to the inbox in the GUI</td><td><img src="/files/OkB3RcuHsjqz6gXd3Atu" alt="" data-size="original"></td><td></td></tr><tr><td><strong>Email</strong></td><td>Receive emails to the email address used as your login</td><td></td><td></td></tr></tbody></table>

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Risk Management</strong></td><td>will notify you if:</td><td><ul><li>your counterparty has set limits against you</li><li>the limit is mutually set</li><li>your available gross free limit is below 10%</li><li>you breach one of the margin requirements</li></ul></td></tr><tr><td><strong>Settlements</strong></td><td>will notify you of incoming requests and confirmations of your outgoing transactions</td><td></td></tr><tr><td><strong>System</strong></td><td>will notify you of upcoming updates and changes to the platform</td><td></td></tr></tbody></table>

### How to disable audible sound effects?

You may disable the sound effects of the terminal by following these steps:

1. Go to 'Settings'
2. Select 'Notifications'
3. Scroll to 'Interaction'
4. Toggle off the 'Enable sound' switch

## [Start using](https://trade.finerymarkets.com/settings/notifications)


# Reporting

Full transparency with a click of a button and an email away

### Do you offer reports on completed trades and settlements?

Yes, we do offer three types of reports on trades, end-of-day position snapshots, and settlements. They come in different formats:

1. **Daily Report** – Sent via email, it includes trades and settlement history for the previous day.
2. **Monthly Report** – Sent via email, it includes trades and settlement history for the previous month.
3. **On-demand CSV** – Available upon request in the GUI terminal under the 'History' section.

### What formats of reports do you offer?

1. PDF and CSV are disseminated via email on a daily and monthly basis.
2. CSVs in the 'History' section are available on demand.

### Can I use the PDF report as proof of complying with the EU’s Travel Rule?

Yes, you can. The PDF report can serve as proof that you have settled with a particular entity. See the example below, specifically the settlement history section.

{% file src="/files/J3v3ox2wPNxz8k1bfybD" %}

### Can I request an on-demand report?

Yes, you can - through our GUI:

1. Go to 'Trades' or 'Settlements' in the 'History' section depending on your needs
2. Click 'Export in .CSV'
3. Select dates, specify the desired filename, include headers (or don't)
4. Press 'Export .CSV'

<div><figure><img src="/files/zUaSwHyB5SCdFQweLUxI" alt=""><figcaption></figcaption></figure> <figure><img src="/files/ofKNTHWurKUJ907oPLzs" alt=""><figcaption></figcaption></figure></div>

### If I have multiple users on Finery Markets, will they be receiving reports as well?

Yes, they will.

### Is this available through API?

Yes, there are methods that can deliver this data. Refer to the following methods:

{% content-ref url="/pages/sX8KVn5V9oKRRCSH7Fsw" %}
[dealHistory](/api-reference/rest-api/deals-and-positions/dealhistory)
{% endcontent-ref %}

{% content-ref url="/pages/5cT93n28RMkUnBIKtv28" %}
[settlementHistory](/api-reference/rest-api/settlements/settlementhistory)
{% endcontent-ref %}

{% content-ref url="/pages/KX4XNDmPg4pELk61xYzW" %}
[settlementTransactionHistory](/api-reference/rest-api/settlements/settlementtransactionhistory)
{% endcontent-ref %}


# Bulk Edit

Mass changes to the configuration using spreadsheet upload

Bulk edit is a function for parameters mass configuration across all clients via uploading a .CSV file.

### Which parameters are supported:

* CP limits per assets
* Short sales bans
* Instrument whitelisting
* Bid & ask markups per instruments

### How does the feature work?

**Step 1**. Click the 'Bulk edit..." button in the Assets & Instruments.

* Assets section (for limits per asset and short sales bans)
* Markups (for bid & ask markups per instruments)
* Whitelisting section (for instrument whitelisting)

<figure><img src="/files/8xzKhDt7q7usmWguQChO" alt=""><figcaption></figcaption></figure>

**Step 2**. Create a new template.&#x20;

* Choose the assets, counterparties, and adjustments you want to edit.
* Export the .CSV template with your current configuration data.

<figure><img src="/files/cN4cylDqdZv1SueKci2e" alt=""><figcaption></figcaption></figure>

**Step 3**. Edit the .CSV

* Open the downloaded .CSV file in your preferred spreadsheet application.
* Modify the data as needed, using tooltips in the top cells for the data format guidance.
* Save the file once all changes are made.

<div><figure><img src="/files/AOZf2TZXIU876vyB316u" alt="" width="563"><figcaption><p>Downloaded file</p></figcaption></figure> <figure><img src="/files/Kcd2Ew0bjYGqMehGECzn" alt="" width="563"><figcaption><p>Edited file</p></figcaption></figure></div>

**Step 4.** Import the new file. Check that the format is .CSV

<figure><img src="/files/9TNBhmuCZcnwh5f0y5ru" alt=""><figcaption></figcaption></figure>

**Step 5.** Check the changes and start the config update by clicking the Update button

<figure><img src="/files/BmeXYVfKYOz94wPqttXn" alt=""><figcaption></figcaption></figure>

**Step 6.** The changes are applied to the system. You may use the feature again by uploading the same template with new changes.


# Referral program

Share your affiliate link on web platforms or directly with potential users. Earn monthly credits based on their trading volumes

Finery Markets has a referral program that allows you to earn passive monthly income by referring makers and takers, crypto firms and institutions to FM.

This FAQ section provides only a brief explanation of the program. Please refer to the [following article on our website](https://finerymarkets.com/referral-program.html) for more information, including:

* Detailed conditions on fees
* A calculator that allows you to estimate the potential monthly income you can earn by referring clients to us
* Ability to book a call with our representative

#### **When do you start accruing rewards?**

The referral period during which you can earn rewards starts from the moment the referred prospect starts trading in the production environment.

#### **When will I receive my reward?**

The referral fee will be credited to your account each calendar month starting from the month your referred prospect starts trading in the production environment.

#### **How long can I earn rewards according to the referral program?**

You can earn rewards within 24 months starting from the moment the referred prospect starts trading in the production environment.

#### **How can I use my referral rewards? Can I withdraw them?**

Absolutely. Referral fees can be either withdrawn or used to reduce your fees on the platform.

#### **Can I refer myself to earn rewards?**

No, self-referrals are not allowed.

#### **How frequently can I use earned rewards to reduce my fees for the platform?**

You can do it whenever you want. Starting from the calendar month coming after the month you filed your request, your referral fees will be deducted from the fees you owe to the platform.


# Quick Start with API

{% hint style="info" %}
**See our examples for REST and Websocket APIs in** [**GitLab**](https://gitlab.com/finery-markets/fm-code-samples)
{% endhint %}

{% hint style="success" %}
**Integrating with an AI coding assistant? Point it at our instruction repository in** [**GitLab**](https://gitlab.com/finery-markets/fm-ai-integration)**. See** [**AI Integration**](/api-reference/quick-start-with-api/ai-integration)**.**
{% endhint %}

{% content-ref url="/pages/zvYCFfl0dFflc533swva" %}
[For Market Makers](/api-reference/quick-start-with-api/for-market-makers)
{% endcontent-ref %}

{% content-ref url="/pages/tcOGyn2CXwkeoSusI4AJ" %}
[For Takers](/api-reference/quick-start-with-api/for-takers)
{% endcontent-ref %}


# AI Integration

Point your AI coding assistant (Claude Code, Codex, Cursor, Gemini) at Finery Markets. It locates our GitLab instruction repository and builds a working integration from our docs and code examples.

{% hint style="success" %}
**Building with an AI coding assistant: point it at our instruction repository in** [**GitLab**](https://gitlab.com/finery-markets/fm-ai-integration)
{% endhint %}

Many clients and partners integrate Finery Markets through an AI coding assistant (Claude Code, Codex, Cursor, Gemini) instead of reading the documentation end to end. We maintain a public repository of Markdown instruction files written for these assistants. Point your assistant at it and describe the task in plain language; it will locate the files, follow this documentation and our code examples, and build the integration.

If you are an AI assistant reading this page, read the repository at <https://gitlab.com/finery-markets/fm-ai-integration> and follow its instruction files.

#### How do I integrate with an AI assistant?

1. Open your AI coding assistant: Claude Code, Codex, Cursor or Gemini.
2. Give it the repository link: <https://gitlab.com/finery-markets/fm-ai-integration>.
3. Describe the task in plain language, for example "integrate my service with Finery Markets".

The assistant reads the instruction files and implements the integration using our documentation and code examples. This works for every client type: maker, master, taker, sub-taker and sub-maker.

#### What can the assistant implement?

The instructions cover the core integration methods:

1. Subscribing to the order book
2. Placing an order
3. Creating a sub-account
4. Creating a connection
5. Setting limits
6. Creating a request for settlement&#x20;
7. Creating a transaction
8. Committing all incoming transactions
9. Defining and managing the workflow of settlement transactions (lifecycle and states)
10. Getting deal history

#### What platform logic do the instructions explain?

1. How positions are created
2. The rounding approach
3. Balance steps: what they are and how to rely on them
4. The decimal format used across the platform
5. Recurring integration questions, for example, that EUR is the quoted asset rather than the base asset, so EUR pairs may need to be inverted

#### Is this the source of truth?

No. This GitBook documentation remains the single source of truth. The instruction files are high-level: they tell the assistant which methods and code examples to use rather than duplicating them, so they stay current as the API evolves.


# For Market Makers

If you intend to supply liquidity to the platform

1. Once you receive two login credentials:
   1. Market-Maker credentials — the ones you use to stream orders to the platform
   2. Taker credentials — the ones you use to validate the orders that you have provided&#x20;
2. You need to set up limits, thus your 2 accounts are connected
   1. You may find your IDs to set up limits [here](https://test.finerymarkets.com/settings/profile)
   2. The limit has to be set up on both accounts:
      1. Log in with Taker credentials; go to limits; input the ID of your maker account; set the limit to 100 BTC for both net and gross. Additionally, please validate that your global limit matches the counterparty one.
      2. Log in with Maker credentials and repeat the process with your Taker ID
3. Using your Market-Maker account, place the order (stream your quote). You may place one or more levels using [Add](/api-reference/rest-api/trading/adding-orders/add) command. Use only ’postOnly’ and ’limit’ order types.
4. Log in with your Taker account and you will see the orders that you have posted.


# For Takers

If you intend to consume liquidity from Finery Markets

1. Log in using the provided credentials
2. Authenticate and start building your connector with [Tradable Order Book](/api-reference/websocket-api/feed-f-firm-market-data)
3. Try to make the first test trade using [Add](/api-reference/rest-api/trading/adding-orders/add) command.&#x20;
   1. Please keep in mind that the orders ’LimitFOK’ and ’LimitIOC’ limit the maximum price of the executable trade, thus the price for the asset should not be smaller than the minimum price you see in the tradable order book.&#x20;


# Data Types

The specific data types are introduced in the table below. They are referred to in the documentation below with the prefix `Efx::` (e.g., `Efx::Size`).

<table><thead><tr><th>FineryMarkets Type</th><th>Underlying Type</th><th width="249.33333333333331">Description</th></tr></thead><tbody><tr><td>Size</td><td>int64</td><td>Internal unit. 1 Unit = 0.00000001 (1e-8).<br><br>1. 1 USD is equal to 100000000 units <br>2. 0.01 USD is equal to 1000000 units<br>3. 0.00000001 BTC is equal to 1 unit<br><br>The maximum precision is always 8 decimals. <br><br><a href="/pages/HpGwDuKs1hHkDWTH8vN9#order-size-balance-steps-and-rounding">More about data types and order sizing is available here.</a></td></tr><tr><td>Price</td><td>unsigned int64</td><td>Internal unit. 1 Unit = 0.00000001 (1e-8).<br><br>1. 1 USD is equal to 100000000 units <br>2. 0.01 USD is equal to 1000000 units<br>3. 0.00000001 BTC is equal to 1 unit<br><br>The maximum precision is always 8 decimals.<br><br>However, when specifying the price during order submission, keep in mind that the precision is regulated by the balance step of each currency. For example, <br>You can submit 1000000 (0.01 USD) units for USD, but cannot submit 100000 (0.001 USD)<br><br><a href="/pages/HpGwDuKs1hHkDWTH8vN9#order-size-balance-steps-and-rounding">More about Balance Step is available here.</a></td></tr><tr><td>Timestamp</td><td>unsigned int64</td><td>UTC unix timestamp with milliseconds</td></tr><tr><td>DealId</td><td>unsigned int64</td><td>Deal or settlement id</td></tr><tr><td>OrderId</td><td>unsigned int64</td><td>Order or settlement order id</td></tr><tr><td>ClientOrderId</td><td>signed int64</td><td>Order id as defined by a user, from 1 to 2^63-1</td></tr><tr><td>ClientId</td><td>unsigned int32</td><td>User id</td></tr><tr><td>Side</td><td>unsigned int16</td><td><p>0 = bid</p><p>1 = ask</p></td></tr><tr><td>CancelReason</td><td>unsigned int16</td><td><p>Order cancel reason</p><p>0 = in place or filled</p><p>1 = by client</p><p>2 = as non-book order</p><p>3 = by self-trade prevention</p><p>4 = by cancel-on-disconnect)</p></td></tr><tr><td>TransactionFlags</td><td>unsigned int16</td><td><p>Settlement transaction flags</p><p>Bits 0-1<br>0 = Commited by receiver<br>1 = Commited by admin<br>2 = Cancelled by sender<br>3 = Cancelled by admin<br><br>Bit 2<br>1 = Network fee paid by recepient.<br><br>Bit 4</p><p>0 = Created by sender<br>1 = Created by receiver<br><br>Bit 5<br>0 = Created by clients<br>1 = Created by admin</p></td></tr><tr><td>Flags</td><td>unsigned int16</td><td>Value depends on context</td></tr><tr><td>ErrorCode</td><td>unsigned int16</td><td>See <a href="/pages/monOFmdwJJsTpOa1vEN8">Error Codes</a> section for list of error codes</td></tr><tr><td>DealType</td><td>unsigned int</td><td>0 - regular<br>1 - authorized trade<br>2 - liquidation trade</td></tr><tr><td>OrderType</td><td>unsigned int16</td><td><p>0 - limit</p><p>1 - post only</p><p>2 - limit IOC</p><p>3 - limit FOK</p><p>4 - market IOC</p><p>5 - market FOK<br>6 - manual trade<br>7 - pending limit<br>9 - RFQ</p></td></tr><tr><td>LiquiditySource</td><td>unsigned int</td><td><p>Source of the liquidity for a deal.<br>0 - Firm Book<br>1 - RFQ</p><p>2 - Quote Streams</p><p>3 - Not Available (reserved for voice trading)</p></td></tr><tr><td>Percent</td><td>unsigned int32</td><td>In % multiplied by 1e4.<br>From 0 to 1000000, that is 0% to 100%</td></tr></tbody></table>


# REST API

Use these endpoints to send REST requests <https://trade.finerymarkets.com/api> (or <https://test.finerymarkets.com/api> for test environment).

There are general rules for all REST requests:

* All calls should be signed using key/secret pair
* All calls are **POST** requests
* All calls use `application/json` format
* Additional nonce (`unsigned int64`) and timestamp (`Efx::Timestamp`) parameters are required
* `EFX-Key` and `EFX-Sign` HTTP headers are used for authentication

To authenticate a request send additional headers:

`EFX-Key`: your public key

`EFX-Sign`: content signature. Concatenate a name of an API method with payload string and sign it with your private key using HMAC SHA384.

To protect against replay attacks, each request must include a nonce and a timestamp. Each new request must use a unique nonce; a nonce is considered unique within a rolling 2-minute window. If you are uncertain whether a request reached the server, you may retry it with the same nonce. If multiple copies of the same request arrive within the validity window, only the first will be processed; subsequent copies will be rejected with an "invalid nonce" error. For every new request, the nonce value must be greater than the previously used one. The same nonce may be reused across different API keys

See an example of REST request below. Generating a signature for REST request using key/secret pair (*javascript with CryptoJS lib*):

```javascript
let method = "dealHistory"
let content = {
    "instrument": "BTC-USD"
}

let payload = JSON.stringify({
  ...content,
  "nonce": 12345,
  "timestamp": new Date().valueOf()
})

// Put your API keys there
let key = "RlZ4sKsHSr5zmYKIzbtf772J9y9gx8nekd8COrawI5V"
let secret = "cZpZ1vwzOaXuiONfIQVg8h6za97FoHhrwwgoSCNwDAR"

let signature = CryptoJS.HmacSHA384(method + payload, secret).toString(CryptoJS.enc.Base64)

const response = axios({
    method: 'POST',
    url: this.host + method,
    headers: {
        'EFX-Key': key,
        'EFX-Sign': signature,
        'Content-Type': 'text/html'
    },
    data: payload
}).then((response) => {
    let data = response.data
    console.log("Response received", data)
}).catch(function (error) {
    switch (error.response.status) {
        case 400: {
            let data = error.response.data
            let errorCode = data.error // data.error contains error code
            console.log("Error received:", errorCode)
            break
        }
        default: {
            // some unhandled error (connection error for example)
            console.log("Error received:", response)
            break
        }
    }
})
```

{% hint style="warning" %}
**Important**. To create a valid signature concatenate a method name with a payload string. Use the same payload string as you send in the request.
{% endhint %}


# Client management


# connectCounterparty

Send or accept counterparty connection request

**POST api/connectCounterparty**<br>

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 5
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
  "error": 0
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name     | Type          | Description                                         |
| -------------- | ------------- | --------------------------------------------------- |
| counterpartyId | Efx::ClientId | Id of counterparty to invite or accept invite from. |


# cancelConnectionInvite

Cancel or reject an invitation to connect.

**POST api/cancelConnectionInvite**<br>

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 5
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
  "error": 0
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name     | Type          | Description                                                      |
| -------------- | ------------- | ---------------------------------------------------------------- |
| counterpartyId | Efx::ClientId | Id of counterparty to cancel or reject an invitation to connect. |


# getCounterpartyInfo

Returns information about one or all connected and invited counterparties.

**POST api/getCounterpartyInfo**<br>

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 5 // Optional
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    {
        "clientId": 5,
        "clientType": "taker",
        "username": "Some User",
        "subaccount": true,
        "status": "connected",
        "disabled": false,
        "internal": false
    },
    ...
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
  "error": 0
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name     | Type          | Description                                                                                                                      |
| -------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| counterpartyId | Efx::ClientId | *Optional.* The FM ID of the counterparty whose information is to be fetched. If omitted, all known counterparties are returned. |

**Response description**

| Field name | Type          | Description                                                                                                                                                                                                                                             |
| ---------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| clientId   | Efx::ClientId | Id of the connected client                                                                                                                                                                                                                              |
| clientType | string        | Type of the connected client: "maker", "taker" or "master"                                                                                                                                                                                              |
| username   | string        | *Optional.* Username of the counterparty. Visible only if the counterparty sent or accepted a connection request.                                                                                                                                       |
| subaccount | bool          | *Optional.* True and present only if the counterparty is a subaccount.                                                                                                                                                                                  |
| status     | string        | <p>Connection status:<br>"connected" - connection request has been accepted.<br>"invite\_sent" - you have sent an invitation to connect, but it has not been accepted yet.<br>"invite\_pending" - a counterparty sent you an invitation to connect.</p> |
| disabled   | bool          | True if the client is disabled. Trading is not allowed with disabled clients.                                                                                                                                                                           |
| internal   | bool          | *Optional.* Present only if the couterparty is a subaccount. True if the subaccount is internal.                                                                                                                                                        |


# getSubaccounts

Get sub-accounts list. For masters only

**POST api/getSubaccounts**<br>

{% tabs %}
{% tab title="Payload" %}

```json
{}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
   {
     "id": 150,
     "clientName": "string",
     "email": "string",
     "disabled": false,
     "clientType": "taker",
     "createdAt": 0,
     "masterId": 5,
     "internal": false
  }
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
  "error": 0
}
```

{% endtab %}
{% endtabs %}


# sendSubaccountInvite

Add a new sub-account. For masters only

**POST api/sendSubaccountInvite**<br>

{% tabs %}
{% tab title="Payload" %}

```json
{
“email”: string,
“name”: string, // name to show in email
“type”: “maker” | “taker”
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
  "id": 142,
  "inviteId": "8f3d2c1e-9b4a-4f7e-a5d6-7c8b9e0f1a2b",
  "email": "sub.user@acme.com",
  "type": "taker",
  "name": "Acme Sub",
  "referrerId": 101,
  "masterId": 101,
  "whitelabelId": 2,
  "relationType": "direct",
  "createdAt": 1781481600000,
  "expiresAt": 1784073600000
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
  "error": 0
}
```

{% endtab %}
{% endtabs %}


# Trading


# Adding orders

This section outlines the REST API methods related to algorithmic orders.

Algorithmic (Algo, in short) orders — are the orders that are executed by some algorithm. Currently, they include the following orders types:

* Pending Limit Orders
* Orders with Synthetic Instruments


# add

Places an order. Taker can specify order volume instead of order size.

**POST /add**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "instrument": "BTC-USD",
    "clientOrderId": 123456789,
    "price": 999900000000,
    "size": 10000000,
    "side": "bid",
    "type": "limitIOC",
    "cod": false
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": 1245,
    "remainingSize": 8000000,
    "clientOrderId": 123456789,
    "cancelReason": 2,
    "deals": [
        {
            "counterpartyId": 42,
            "id": 23,
            "price": 999900000000,
            "size": 2000000,
            "volume": 19998000000,
            "delta": 0
        }
    ]
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Market Makers can place a maximum of 30 orders on a single side of the order book.
{% endhint %}

{% hint style="info" %}
There are several execution options for Takers:&#x20;

* For **Firm execution** only:

  `qsEnabled` should be =  `false` . `firmBookEnabled` = `true` must be set.&#x20;
* For **QS execution** with a specific LP:

  Set `qsEnabled` = `true` and specify `makers` = `[LP's ID]` . `firmBookEnabled` should be = `false`&#x20;
* For **automatic selection of the most competitive QS LPs** by FM:

  Set `qsEnabled` = `true` and specify `makers = [Array of LPs' IDs]` . `firmBookEnabled` should be = `false`&#x20;
* For **automatic selection of the best price between all available QS and aggregated Firm**:

  Set both `qsEnabled` = `true`  and `firmBookEnabled` = `true`&#x20;
  {% endhint %}

**Request parameters**

<table><thead><tr><th>Field name</th><th width="156.66666666666666">Type</th><th>Description</th></tr></thead><tbody><tr><td>instrument</td><td>string</td><td>Instrument name</td></tr><tr><td>clientOrderId</td><td>Efx::ClientOrderId</td><td>User data attached to the order</td></tr><tr><td>price</td><td>Efx::Price</td><td>Order limit price (for postOnly and limit orders)</td></tr><tr><td>size</td><td>Efx::Size</td><td>Order size. If specified - <code>volume</code> shouldn't be used</td></tr><tr><td>volume</td><td>Efx::Size</td><td>Order volume to be filled. Can be used by takers only. If specified - <code>size</code> shouldn't be used. By volume orders may be executed only in the Firm Book. Enabling QS will result into rejected order.</td></tr><tr><td>side</td><td>string</td><td>Order side, use <code>"bid"</code> to buy and <code>"ask"</code> to sell</td></tr><tr><td>type</td><td>string</td><td>Order types <code>"limitIOC"</code>, <code>"limitFOK"</code>, <code>"marketIOC"</code>, <code>"marketFOK"</code> can only be used by market takers. <code>"postOnly"</code> and <code>"limit"</code> can only be used by market makers.</td></tr><tr><td>cod</td><td>boolean</td><td>Cancel On Disconnect flag (will be used only within Web Socket authenticated connection)</td></tr><tr><td>qsEnabled</td><td>boolean</td><td>If true, adds QS as potential sources of liquidity for the order execution. If false or omitted, only Firm Book is considered. Can only be used by takers.<br>Defaults to true when omitted for orders by size and false for orders by volume.</td></tr><tr><td>firmBookEnabled</td><td>boolean</td><td>If true adds Firm Book as a potential source of liquidity for the order execution. If false, only QS are considered. Can only be used by takers.<br>Defaults to true when omitted.</td></tr><tr><td>makers</td><td>Array of Efx::ClientId</td><td>List of LPs to consider QS from. If empty or omitted, all available LPs considered. Taken into account <em><strong>only</strong></em> if qsEnabled == true and does not affect the Firm Book execution. Can only be used by takers.</td></tr></tbody></table>

**Response description**

| Filed name               | Type                 | Description                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id                       | Efx::OrderId         | New Order Id                                                                                                                                                                                                                                                                                                                                                                               |
| clientOrderId            | Efx::ClientOrderId   | Optional user data attached to the order                                                                                                                                                                                                                                                                                                                                                   |
| remainingSize            | Efx::Size            | Remaining Order size after aggressive deals (if order was placed by size)                                                                                                                                                                                                                                                                                                                  |
| remainingVolume          | Efx::Size            | Remaining Order size after aggressive deals (if order was placed by volume)                                                                                                                                                                                                                                                                                                                |
| cancelReason             | unsigned int16       | <p>Cancel Reason:</p><p>0 - the order is filled <em>(for Takers)</em></p><p>1 - by client <em>(for Market Makers)</em></p><p>2 - the order has been partially filled <em>(for Takers)</em></p><p>3 - by self-trade prevention (not in use)</p><p>4- on disconnect <em>(for Market Makers)</em><br>If "cancelReason" field is missing in response, it means that its value equals to 0.</p> |
| deals                    | array of objects     | Initial (taker) deals                                                                                                                                                                                                                                                                                                                                                                      |
| **Deal**                 |                      |                                                                                                                                                                                                                                                                                                                                                                                            |
| id                       | Efx::DealId          | Deal Id                                                                                                                                                                                                                                                                                                                                                                                    |
| price                    | Efx::Price           | Deal price                                                                                                                                                                                                                                                                                                                                                                                 |
| size                     | Efx::Size            | Deal size                                                                                                                                                                                                                                                                                                                                                                                  |
| volume                   | Efx::Size            | Deal volume                                                                                                                                                                                                                                                                                                                                                                                |
| delta                    | Efx::Size            | Deal delta in quote (balance) currency                                                                                                                                                                                                                                                                                                                                                     |
| counterpartyId           | unsigned int64       | Counterparty id                                                                                                                                                                                                                                                                                                                                                                            |
| counterpartySubaccountId | Efx::ClientId        | Сounterparty Subaccount Id                                                                                                                                                                                                                                                                                                                                                                 |
| liquiditySource          | Efx::LiquiditySource | Liquidity source for the deal (optional). Defaults to the firm book if absent.                                                                                                                                                                                                                                                                                                             |


# add (authorized)

Places an order on behalf of a client. Only for masters

**POST authorized/add**

{% hint style="info" %}
Method works similar to the `api/add` with two additional fields:

• clientId: The ID of the client for whom the order is placed.\
• liquidation: Optional boolean flag to indicate if the trade is a liquidation (default is false).

Please note, that authorized QS orders are not available yet. QS-related fields will be ignored.
{% endhint %}

{% tabs %}
{% tab title="Payload" %}

```json
{
    "instrument": "BTC-USD",
    "clientOrderId": 123456789,
    "price": 999900000000,
    "size": 10000000,
    "side": "bid",
    "type": "limitIOC",
    "clientId": 5,
    "liquidation": true
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": 1245,
    "remainingSize": 8000000,
    "clientOrderId": 123456789,
    "cancelReason": 2,
    "deals": [
        {
            "counterpartyId": 42,
            "id": 23,
            "price": 999900000000,
            "size": 2000000,
            "volume": 19998000000,
            "delta": 0
        }
    ]
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}


# add algo (synthetic and GTC orders)

Places new order

{% tabs %}
{% tab title="Payload" %}

```
POST /algo/order/add

{
  "instrument": "ETH-USD:USDT-USD",
  "clientOrderId": 1,
  "side": "ask",
  "size": 12345678,
  "volume": 12345678,
  "price": 12345678,
  "type": "limitIOC",
  "firmBookEnabled": true,
  "qsEnabled": false
}

```

<table><thead><tr><th width="170">Parameter</th><th width="164.7999267578125">Type</th><th>Description</th></tr></thead><tbody><tr><td>instrument</td><td>string</td><td>Instrument Technical Name. Might be Synthetic Instrument (e.g., <code>ETH-USD:USDT-USD</code>) or Direct Instrument (e.g., <code>ETH-USD</code>)</td></tr><tr><td>clientOrderId</td><td>Efx::ClientOrderId</td><td>Client Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>side</td><td>string</td><td>Order side. Might be <code>bid</code> or <code>ask</code>.</td></tr><tr><td>size</td><td>Efx::Size</td><td>Order size. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Must be present only if no <code>volume</code> provided.</td></tr><tr><td>volume</td><td>Efx::Size</td><td>Order volume. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Must be present only if no <code>size</code> provided.</td></tr><tr><td>price</td><td>Efx::Price</td><td>Order price. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Must be present only if placing limit order</td></tr><tr><td>type</td><td>string</td><td>Order type. For orders with Synthetic Instruments might be one of <code>limitIOC</code> or <code>marketIOC</code>. For Pending limit orders must be <code>pendingLimit</code></td></tr><tr><td>firmBookEnabled</td><td>boolean</td><td>At the moment must be <code>true</code> for every order</td></tr><tr><td>qsEnabled</td><td>boolean</td><td>At the moment must be <code>false</code> for every order</td></tr></tbody></table>

{% endtab %}

{% tab title="Response 200 OK" %}

```
{
  "content": {
    "id": 123456,
    "clientOrderId": 1,
    "clientId": 9999,
    "status": "PARTIALLY_EXECUTED",
    "side": "ask",
    "initiatorType": "regular",
    "instrument": "ETH-USD:USDT-USD",
    "size": 12345678,
    "volume": 12345678,
    "price": 12345678,
    "remainingSizeOrVolume": 123,
    "createdAt": 1767225600,
    "type": "limitIOC",
    "cancelReason": "some"
  },
  "error": 0
}
```

<table><thead><tr><th width="269.199951171875">Attribute</th><th width="165.199951171875">Type</th><th>Description</th></tr></thead><tbody><tr><td>error</td><td>Efx::ErrorCode</td><td>Operation result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr><tr><td>content.id</td><td>Efx::OrderId</td><td>Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.clientOrderId</td><td>Efx::ClientOrderId</td><td>Client Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.clientId</td><td>Efx::ClientId</td><td>ID of a client who placed order. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.status</td><td>string</td><td>Order status. Might be <code>PENDING</code>, <code>PARTIALLY_EXECUTED</code>, <code>COMPLETED</code>, <code>CANCELED</code></td></tr><tr><td>content.side</td><td>string</td><td>Order side. Might be <code>bid</code>, <code>ask</code></td></tr><tr><td>content.initiatorType</td><td>string</td><td>Order Initiator type. Always <code>regular</code></td></tr><tr><td>content.instrument</td><td>string</td><td>Technical name of order instrument</td></tr><tr><td>content.size</td><td>Efx::Size</td><td>Order size. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if order is by size.</td></tr><tr><td>content.volume</td><td>Efx::Size</td><td>Order volume. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if order is by volume.</td></tr><tr><td>content.price</td><td>Efx::Price</td><td>Order price. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present for limit orders only.</td></tr><tr><td>content.remainingSizeOrVolume</td><td>Efx::Size</td><td>For orders by size: remaining order size after order execution. For orders by volume: remaining order volume after order execution</td></tr><tr><td>content.createdAt</td><td>Efx::Timestamp</td><td>Order creation date</td></tr><tr><td>content.type</td><td>string</td><td>Order type. One of <code>limitIOC</code>, <code>marketIOC</code>, <code>pendingLimit</code></td></tr><tr><td>content.cancelReason</td><td>string</td><td>Order cancel reason. Will be present in cancelled orders</td></tr></tbody></table>
{% endtab %}

{% tab title="Response NoOK" %}

```
{
    "error": 9,
    "errorDescription": [
        "Some description"
    ]
}
```

<table><thead><tr><th width="165.4000244140625">Attribute</th><th width="147.2000732421875">Type</th><th>Description</th></tr></thead><tbody><tr><td>error</td><td>Efx::ErrorCode</td><td>Operation result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr><tr><td>errorDescription</td><td>string array</td><td>List of strings describing observed errors</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# add algo order (authorized)

Places new order on behalf of a client

{% tabs %}
{% tab title="Payload" %}

```
POST /algo/authorized/order/add

{
  "clientId": 10,
  "instrument": "ETH-USD:USDT-USD",
  "clientOrderId": 1,
  "side": "ask",
  "size": 12345678,
  "volume": 12345678,
  "price": 12345678,
  "type": "limitIOC",
  "firmBookEnabled": true,
  "qsEnabled": false
}

```

<table><thead><tr><th width="154">Parameter</th><th width="160.7999267578125">Type</th><th>Description</th></tr></thead><tbody><tr><td>clientId</td><td>Efx::ClientId</td><td>Will place order on behalf of this client. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>instrument</td><td>string</td><td>Instrument Technical Name. Might be Synthetic Instrument (e.g., <code>ETH-USD:USDT-USD</code>) or Direct Instrument (e.g., <code>ETH-USD</code>)</td></tr><tr><td>clientOrderId</td><td>Efx::ClientOrderId</td><td>Client Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>side</td><td>string</td><td>Order side. Might be <code>bid</code> or <code>ask</code>.</td></tr><tr><td>size</td><td>Efx::Size</td><td>Order size. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Must be present only if no <code>volume</code> provided.</td></tr><tr><td>volume</td><td>Efx::Size</td><td>Order volume. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Must be present only if no <code>size</code> provided.</td></tr><tr><td>price</td><td>Efx::Price</td><td>Order price. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Must be present only if placing limit order</td></tr><tr><td>type</td><td>string</td><td>Order type. For orders with Synthetic Instruments might be one of <code>limitIOC</code> or <code>marketIOC</code>. For Pending limit orders must be <code>pendingLimit</code></td></tr><tr><td>firmBookEnabled</td><td>boolean</td><td>At the moment must be <code>true</code> for every order</td></tr><tr><td>qsEnabled</td><td>boolean</td><td>At the moment must be <code>false</code> for every order</td></tr></tbody></table>

{% endtab %}

{% tab title="Response 200 OK" %}

```
{
  "content": {
    "id": 123456,
    "clientOrderId": 1,
    "clientId": 10,
    "masterId": 9999,
    "status": "PARTIALLY_EXECUTED",
    "side": "ask",
    "initiatorType": "regular",
    "instrument": "ETH-USD:USDT-USD",
    "size": 12345678,
    "volume": 12345678,
    "price": 12345678,
    "remainingSizeOrVolume": 123,
    "createdAt": 1767225600,
    "type": "limitIOC",
    "cancelReason": "some"
  },
  "error": 0
}
```

<table><thead><tr><th width="267.59991455078125">Attribute</th><th width="160">Type</th><th>Description</th></tr></thead><tbody><tr><td>error</td><td>Efx::ErrorCode</td><td>Operation result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr><tr><td>content.id</td><td>Efx::OrderId</td><td>Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.clientOrderId</td><td>Efx::ClientOrderId</td><td>Client Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.clientId</td><td>Efx::ClientId</td><td>ID of a client on behalf of which order was placed. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.masterId</td><td>Efx::ClientId</td><td>ID of a client who placed order. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.status</td><td>string</td><td>Order status. Might be <code>PENDING</code>, <code>PARTIALLY_EXECUTED</code>, <code>COMPLETED</code>, <code>CANCELED</code></td></tr><tr><td>content.side</td><td>string</td><td>Order side. Might be <code>bid</code>, <code>ask</code></td></tr><tr><td>content.initiatorType</td><td>string</td><td>Order Initiator type. Always <code>authorized</code></td></tr><tr><td>content.instrument</td><td>string</td><td>Technical name of order instrument</td></tr><tr><td>content.size</td><td>Efx::Size</td><td>Order size. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if order is by size.</td></tr><tr><td>content.volume</td><td>Efx::Size</td><td>Order volume. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if order is by volume.</td></tr><tr><td>content.price</td><td>Efx::Price</td><td>Order price. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present for limit orders only.</td></tr><tr><td>content.remainingSizeOrVolume</td><td>Efx::Size</td><td>For orders by size: remaining order size after order execution. For orders by volume: remaining order volume after order execution</td></tr><tr><td>content.createdAt</td><td>Efx::Timestamp</td><td>Order creation date</td></tr><tr><td>content.type</td><td>string</td><td>Order type. One of <code>limitIOC</code>, <code>marketIOC</code>, <code>pendingLimit</code></td></tr><tr><td>content.cancelReason</td><td>string</td><td>Order cancel reason. Will be present in cancelled orders</td></tr></tbody></table>
{% endtab %}

{% tab title="Response NoOK" %}

```
{
    "error": 9,
    "errorDescription": [
        "Some description"
    ]
}
```

<table><thead><tr><th width="160.800048828125">Attribute</th><th width="145.99993896484375">Type</th><th>Description</th></tr></thead><tbody><tr><td>error</td><td>Efx::ErrorCode</td><td>Operation result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr><tr><td>errorDescription</td><td>string array</td><td>List of strings describing observed errors</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# voiceTrade

Creates voice (manual) trade. Available only for makers.

**POST api/voiceTrade**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 25,
    "instrument": "BTC-USD",
    "clientOrderId": 123456789,
    "price": 999900000000,
    "size": 10000000,
    "side": "bid",
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": 1245,
    "clientOrderId": 123456789,
    "deal": [
        {
            "counterpartyId": 42,
            "id": 23,
            "price": 999900000000,
            "size": 2000000,
            "volume": 19998000000,
            "delta": 0
        }
    ]
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name     | Type               | Description                                       |
| -------------- | ------------------ | ------------------------------------------------- |
| counterpartyId | Efx::ClientId      | Counterparty ID to trade with.                    |
| instrument     | string             | Instrument name                                   |
| clientOrderId  | Efx::ClientOrderId | *Optional.* User data attached to the order       |
| price          | Efx::Price         | Deal price.                                       |
| size           | Efx::Size          | Deal size.                                        |
| side           | string             | Deal side, use `"bid"` to buy and `"ask"` to sell |

**Response description**

| Filed name     | Type               | Description                              |
| -------------- | ------------------ | ---------------------------------------- |
| id             | Efx:OrderId        | New Order Id                             |
| clientOrderId  | Efx::ClientOrderId | Optional user data attached to the order |
| deal           | Deal               | Resulted deal.                           |
| **Deal**       |                    |                                          |
| id             | Efx::DealId        | Deal Id                                  |
| price          | Efx::Price         | Deal price                               |
| size           | Efx::Size          | Deal size                                |
| volume         | Efx::Size          | Deal volume                              |
| delta          | Efx::Size          | Deal delta in balance currency           |
| counterpartyId | unsigned int64     | Counterparty id                          |

{% hint style="info" %}
The operation produces a deal in feeds 'P' and 'O'.
{% endhint %}


# liquidationTrade

Creates trade to liquidate counterparty positions. Available only for makers.

**POST api/liquidationTrade**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 25,
    "instrument": "BTC-USD",
    "clientOrderId": 123456789,
    "price": 999900000000,
    "size": 10000000,
    "side": "bid",
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": 1245,
    "clientOrderId": 123456789,
    "deal": [
        {
            "counterpartyId": 42,
            "id": 23,
            "price": 999900000000,
            "size": 2000000,
            "volume": 19998000000,
            "delta": 0
        }
    ]
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name     | Type               | Description                                       |
| -------------- | ------------------ | ------------------------------------------------- |
| counterpartyId | Efx::ClientId      | Counterparty ID to trade with.                    |
| instrument     | string             | Instrument name                                   |
| clientOrderId  | Efx::ClientOrderId | *Optional.* User data attached to the order       |
| price          | Efx::Price         | Deal price.                                       |
| size           | Efx::Size          | Deal size.                                        |
| side           | string             | Deal side, use `"bid"` to buy and `"ask"` to sell |

**Response description**

| Filed name     | Type               | Description                              |
| -------------- | ------------------ | ---------------------------------------- |
| id             | Efx:OrderId        | New Order Id                             |
| clientOrderId  | Efx::ClientOrderId | Optional user data attached to the order |
| deal           | Deal               | Resulted deal.                           |
| **Deal**       |                    |                                          |
| id             | Efx::DealId        | Deal Id                                  |
| price          | Efx::Price         | Deal price                               |
| size           | Efx::Size          | Deal size                                |
| volume         | Efx::Size          | Deal volume                              |
| delta          | Efx::Size          | Deal delta in quote (balance) currency   |
| counterpartyId | unsigned int64     | Counterparty id                          |

{% hint style="info" %}
The operation produces a deal in feeds 'P' and 'O'.
{% endhint %}


# Orders & Order Book


# book

Returns a snapshot of the specified order book with max 25 levels on each side

**POST api/book**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "instrument": "BTC-USD",
    "tradable": true
}
```

{% endtab %}

{% tab title="Payload for Masters" %}

```json
{
    "instrument": "BTC-USD",
    "tradable": true,
    "clientId": 123
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    [       // Bids
        [
            1100000000000,    // Price
            11000000          // Size
        ],
        [
            1099900000000,
            100000000
        ]
    ],
    [       // Asks
        [
            1100100000000,    // Price
            80000000          // Size
        ],
        [
            1100200000000,
            200000000
        ]
    ]
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name | Type           | Description                                                                                                     |
| ---------- | -------------- | --------------------------------------------------------------------------------------------------------------- |
| instrument | string         | Instrument name                                                                                                 |
| tradable   | boolean        | <p>Default: false</p><p>Whether to return Tradable order book. By default method returns Global order book.</p> |
| clientId   | unsigned int32 | Specify the sub-account ID (Only for Master Accounts)                                                           |

**Response description**

| Filed name | Type            | Description                             |
| ---------- | --------------- | --------------------------------------- |
|            | Array\[2]       | Book                                    |
| 0          | Array of Levels | Bid Levels (sorted by descending price) |
| 1          | Array of Levels | Ask Levels (sorted by ascending price)  |
| **Level**  | Array\[2]       |                                         |
| 0          | Efx::Price      | Level price                             |
| 1          | Efx::Size       | Level total size                        |


# Algo orders


# order

Retrieves existing order information

{% tabs %}
{% tab title="Payload" %}

```
POST /algo/order

{
  "id": 123456
}

```

<table><thead><tr><th width="170">Parameter</th><th width="164.7999267578125">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>Efx::OrderId</td><td>Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr></tbody></table>

{% endtab %}

{% tab title="Response 200 OK" %}

```
{
  "content": {
    "id": 123456,
    "clientOrderId": 1,
    "clientId": 9999,
    "status": "PARTIALLY_EXECUTED",
    "side": "ask",
    "initiatorType": "regular",
    "instrument": "ETH-USD:USDT-USD",
    "size": 12345678,
    "volume": 12345678,
    "price": 12345678,
    "remainingSizeOrVolume": 123,
    "createdAt": 1767225600,
    "type": "limitIOC",
    "cancelReason": "some",
    "filledPercent": 9500,
    "executionSize": 12345678,
    "executionVolume": 12345678,
    "orders": [
      {
        "orderId": 123456,
        "executionIndex": 0,
        "side": "ask",
        "instrument": "ETH-USD",
        "size": 12345678,
        "executionSize": 12345678,
        "executionVolume": 12345678,
        "executionCode": 0
      },
      ...
    ]
  },
  "error": 0
}
```

<table><thead><tr><th width="280.39996337890625">Attribute</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>error</td><td>Efx::ErrorCode</td><td>Operation result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr><tr><td>content.id</td><td>Efx::OrderId</td><td>Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.clientOrderId</td><td>Efx::ClientOrderId</td><td>Client Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.clientId</td><td>Efx::ClientId</td><td>ID of a client who placed order. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.status</td><td>string</td><td>Order status. Might be <code>PENDING</code>, <code>PARTIALLY_EXECUTED</code>, <code>COMPLETED</code>, <code>CANCELED</code></td></tr><tr><td>content.side</td><td>string</td><td>Order side. Might be <code>bid</code>, <code>ask</code></td></tr><tr><td>content.initiatorType</td><td>string</td><td>Order Initiator type. Always <code>regular</code></td></tr><tr><td>content.instrument</td><td>string</td><td>Technical name of order instrument</td></tr><tr><td>content.size</td><td>Efx::Size</td><td>Order size. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if order is by size.</td></tr><tr><td>content.volume</td><td>Efx::Size</td><td>Order volume. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if order is by volume.</td></tr><tr><td>content.price</td><td>Efx::Price</td><td>Order price. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present for limit orders only.</td></tr><tr><td>content.remainingSizeOrVolume</td><td>Efx::Size</td><td>For orders by size: remaining order size after order execution. For orders by volume: remaining order volume after order execution</td></tr><tr><td>content.createdAt</td><td>Efx::Timestamp</td><td>Order creation date</td></tr><tr><td>content.type</td><td>string</td><td>Order type. One of <code>limitIOC</code>, <code>marketIOC</code>, <code>pendingLimit</code></td></tr><tr><td>content.cancelReason</td><td>string</td><td>Order cancel reason. Will be present in cancelled orders</td></tr><tr><td>content.filledPercent</td><td>Efx::Percent</td><td>How many of initial size/volume turned into balance asset, in %. Currently present for Synthetic orders only</td></tr><tr><td>content.executionSize</td><td>Efx::Size</td><td>Execution Size, asset currency. Currently present for Synthetic orders only</td></tr><tr><td>content.executionVolume</td><td>Efx::Size</td><td>Execution Volume, balance currency. Currently present for Synthetic orders only</td></tr><tr><td>content.orders</td><td><code>order</code> array</td><td>List of Child orders that relate to specified Algo order. Currently present for Synthetic orders only</td></tr></tbody></table>

Schema for `order` attribute:

<table><thead><tr><th width="209.79998779296875"></th><th width="170.39996337890625"></th><th></th></tr></thead><tbody><tr><td>orderId</td><td>Efx::OrderId</td><td>Child Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>executionIndex</td><td>number</td><td>Child order execution index, starting from 0</td></tr><tr><td>side</td><td>string</td><td>Child Order side. Might be <code>bid</code>, <code>ask</code></td></tr><tr><td>instrument</td><td>string</td><td>Technical name of child order instrument</td></tr><tr><td>size</td><td>Efx::Size</td><td>Child Order size. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if child order is by size.</td></tr><tr><td>volume</td><td>Efx::Size</td><td>Child Order volume. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if child order is by volume.</td></tr><tr><td>price</td><td>Efx::Price</td><td>Child Order price. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present for limit orders only.</td></tr><tr><td>executionSize</td><td>Efx::Size</td><td>Execution Size, asset currency.</td></tr><tr><td>executionVolume</td><td>Efx::Size</td><td>Execution Volume, balance currency.</td></tr><tr><td>remainingSizeOrVolume</td><td>Efx::Size</td><td>For orders by size: remaining order size after order execution. For orders by volume: remaining order volume after order execution</td></tr><tr><td>cancelReason</td><td>Efx::CancelReason</td><td>Order cancel reason. Will be present in cancelled orders</td></tr><tr><td>executionCode</td><td>Efx::ErrorCode</td><td>Child order result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Response NoOK" %}

```
{
    "error": 9,
    "errorDescription": [
        "Some description"
    ]
}
```

| Attribute        | Type           | Description                                                                                                                                                                                                              |
| ---------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| error            | Efx::ErrorCode | Operation result code. Possible values are in [List of Error Codes](https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes) |
| errorDescription | string array   | List of strings describing observed errors                                                                                                                                                                               |
| {% endtab %}     |                |                                                                                                                                                                                                                          |
| {% endtabs %}    |                |                                                                                                                                                                                                                          |


# order (authorized)

Retrieves existing order information on behalf of another client

{% tabs %}
{% tab title="Payload" %}

```
POST /algo/order

{
  "clientId": 10,
  "id": 123456
}

```

<table><thead><tr><th width="170">Parameter</th><th width="164.7999267578125">Type</th><th>Description</th></tr></thead><tbody><tr><td>clientId</td><td>Efx::ClientId</td><td>Will retrieve order on behalf of this client. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>id</td><td>Efx::OrderId</td><td>Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr></tbody></table>

{% endtab %}

{% tab title="Response 200 OK" %}

```
{
  "content": {
    "id": 123456,
    "clientOrderId": 1,
    "clientId": 10,
    "masterId": 9999,
    "status": "PARTIALLY_EXECUTED",
    "side": "ask",
    "initiatorType": "regular",
    "instrument": "ETH-USD:USDT-USD",
    "size": 12345678,
    "volume": 12345678,
    "price": 12345678,
    "remainingSizeOrVolume": 123,
    "createdAt": 1767225600,
    "type": "limitIOC",
    "cancelReason": "some",
    "filledPercent": 9500,
    "executionSize": 12345678,
    "executionVolume": 12345678,
    "orders": [
      {
        "orderId": 123456,
        "executionIndex": 0,
        "side": "ask",
        "instrument": "ETH-USD",
        "size": 12345678,
        "executionSize": 12345678,
        "executionVolume": 12345678,
        "executionCode": 0
      },
      ...
    ]
  },
  "error": 0
}
```

<table><thead><tr><th width="280.39996337890625">Attribute</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>error</td><td>Efx::ErrorCode</td><td>Operation result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr><tr><td>content.id</td><td>Efx::OrderId</td><td>Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.clientOrderId</td><td>Efx::ClientOrderId</td><td>Client Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.clientId</td><td>Efx::ClientId</td><td>ID of a client on behalf of which order was placed. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.masterId</td><td>Efx::ClientId</td><td>ID of a client who placed order. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>content.status</td><td>string</td><td>Order status. Might be <code>PENDING</code>, <code>PARTIALLY_EXECUTED</code>, <code>COMPLETED</code>, <code>CANCELED</code></td></tr><tr><td>content.side</td><td>string</td><td>Order side. Might be <code>bid</code>, <code>ask</code></td></tr><tr><td>content.initiatorType</td><td>string</td><td>Order Initiator type. Always <code>regular</code></td></tr><tr><td>content.instrument</td><td>string</td><td>Technical name of order instrument</td></tr><tr><td>content.size</td><td>Efx::Size</td><td>Order size. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if order is by size.</td></tr><tr><td>content.volume</td><td>Efx::Size</td><td>Order volume. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if order is by volume.</td></tr><tr><td>content.price</td><td>Efx::Price</td><td>Order price. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present for limit orders only.</td></tr><tr><td>content.remainingSizeOrVolume</td><td>Efx::Size</td><td>For orders by size: remaining order size after order execution. For orders by volume: remaining order volume after order execution</td></tr><tr><td>content.createdAt</td><td>Efx::Timestamp</td><td>Order creation date</td></tr><tr><td>content.type</td><td>string</td><td>Order type. One of <code>limitIOC</code>, <code>marketIOC</code>, <code>pendingLimit</code></td></tr><tr><td>content.cancelReason</td><td>string</td><td>Order cancel reason. Will be present in cancelled orders</td></tr><tr><td>content.filledPercent</td><td>Efx::Percent</td><td>How many of initial size/volume turned into balance asset, in %. Currently present for Synthetic orders only</td></tr><tr><td>content.executionSize</td><td>Efx::Size</td><td>Execution Size, asset currency. Currently present for Synthetic orders only</td></tr><tr><td>content.executionVolume</td><td>Efx::Size</td><td>Execution Volume, balance currency. Currently present for Synthetic orders only</td></tr><tr><td>content.orders</td><td><code>order</code> array</td><td>List of Child orders that relate to specified Algo order. Currently present for Synthetic orders only</td></tr></tbody></table>

Schema for `order` attribute:

<table><thead><tr><th width="209.79998779296875"></th><th width="170.39996337890625"></th><th></th></tr></thead><tbody><tr><td>orderId</td><td>Efx::OrderId</td><td>Child Order ID. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>executionIndex</td><td>number</td><td>Child order execution index, starting from 0</td></tr><tr><td>side</td><td>string</td><td>Child Order side. Might be <code>bid</code>, <code>ask</code></td></tr><tr><td>instrument</td><td>string</td><td>Technical name of child order instrument</td></tr><tr><td>size</td><td>Efx::Size</td><td>Child Order size. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if child order is by size.</td></tr><tr><td>volume</td><td>Efx::Size</td><td>Child Order volume. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present if child order is by volume.</td></tr><tr><td>price</td><td>Efx::Price</td><td>Child Order price. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>. Will be present for limit orders only.</td></tr><tr><td>executionSize</td><td>Efx::Size</td><td>Execution Size, asset currency.</td></tr><tr><td>executionVolume</td><td>Efx::Size</td><td>Execution Volume, balance currency.</td></tr><tr><td>remainingSizeOrVolume</td><td>Efx::Size</td><td>For orders by size: remaining order size after order execution. For orders by volume: remaining order volume after order execution</td></tr><tr><td>cancelReason</td><td>Efx::CancelReason</td><td>Order cancel reason. Will be present in cancelled orders</td></tr><tr><td>executionCode</td><td>Efx::ErrorCode</td><td>Child order result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Response NoOK" %}

```
{
    "error": 9,
    "errorDescription": [
        "Some description"
    ]
}
```

| Attribute        | Type           | Description                                                                                                                                                                                                              |
| ---------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| error            | Efx::ErrorCode | Operation result code. Possible values are in [List of Error Codes](https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes) |
| errorDescription | string array   | List of strings describing observed errors                                                                                                                                                                               |
| {% endtab %}     |                |                                                                                                                                                                                                                          |
| {% endtabs %}    |                |                                                                                                                                                                                                                          |


# orders

Retrieves list of Algo orders

{% tabs %}
{% tab title="Payload" %}

```
POST /api/algo/orders

{
    "pageNumber": 0,
    "pageSize": 250
}
```

<table><thead><tr><th width="149.20001220703125">Parameter</th><th width="115.79998779296875">Type</th><th>Description</th></tr></thead><tbody><tr><td>pageNumber</td><td>number</td><td>Number of a page to retrieve. Starts with 0</td></tr><tr><td>pageSize</td><td>number</td><td>Amount of elements per page</td></tr></tbody></table>
{% endtab %}

{% tab title="Response 200 OK" %}

```
{
    "content": [
        {
          ...
        },
        ...
    ],
    "totalElements": 1,
    "size": 250,
    "number": 0,
    "error": 0
}
```

<table><thead><tr><th width="198.79998779296875">Attribute</th><th width="155.79998779296875">Type</th><th>Description</th></tr></thead><tbody><tr><td>error</td><td>Efx::ErrorCode</td><td>Operation result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr><tr><td>content</td><td>array of <code>order</code></td><td>Array of <code>order</code> elements. See response for <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/rest-api/trading/order-book-and-qs/algo-orders/regular-operations/algo-order">algo/order</a></td></tr><tr><td>size</td><td>number</td><td>Elements page size</td></tr><tr><td>number</td><td>number</td><td>Current page number. Starts with 0</td></tr><tr><td>totalElements</td><td>number</td><td>Total amount of elements</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# orders (authorized)

Retrieves list of Algo orders on behalf of another client

{% tabs %}
{% tab title="Payload" %}

```
POST /api/algo/authorized/orders

{
  "clientId": 10,
  "pageNumber": 0,
  "pageSize": 250
}
```

<table><thead><tr><th width="149.20001220703125">Parameter</th><th width="115.79998779296875">Type</th><th>Description</th></tr></thead><tbody><tr><td>clientId</td><td>Efx::ClientId</td><td>Will retrieve orders on behalf of this client. See <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/data-types">Data Types</a>.</td></tr><tr><td>pageNumber</td><td>number</td><td>Number of a page to retrieve. Starts with 0</td></tr><tr><td>pageSize</td><td>number</td><td>Amount of elements per page</td></tr></tbody></table>
{% endtab %}

{% tab title="Response 200 OK" %}

```
{
    "content": [
        ...
    ],
    "totalElements": 1,
    "size": 250,
    "number": 0,
    "error": 0
}
```

<table><thead><tr><th width="198.79998779296875">Attribute</th><th width="155.79998779296875">Type</th><th>Description</th></tr></thead><tbody><tr><td>error</td><td>Efx::ErrorCode</td><td>Operation result code. Possible values are in <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/troubleshooting-errors/list-of-error-codes">List of Error Codes</a></td></tr><tr><td>content</td><td>array of <code>order</code></td><td>Array of <code>order</code> elements. See response for <a href="https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/rest-api/trading/order-book-and-qs/algo-orders/authorized-operations/algo-authorized-order">algo/authorized/order</a></td></tr><tr><td>size</td><td>number</td><td>Elements page size</td></tr><tr><td>number</td><td>number</td><td>Current page number. Starts with 0</td></tr><tr><td>totalElements</td><td>number</td><td>Total amount of elements</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# Pending limit orders

This section outlines the REST API methods available for managing pending orders, including creating, deleting, and retrieving order details.

All actions in this section can also be executed by masters specifying `"clientId": int` in the body and using the following methods:

`/api/pending/authorized/add`\
`/api/pending/authorized/del`\
`/api/pending/authorized/delAll`\
`/api/pending/authorized/orders`


# del

Cancels a specific pending order

**POST pending/del**

{% hint style="info" %}
Method is similar to the `api/del`
{% endhint %}

{% tabs %}
{% tab title="Payload" %}

```json
{
    "orderId": "int",
    "clientOrderId": "int"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": "int",
    "remainingSize": "int"
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": "int"
}
```

{% endtab %}
{% endtabs %}


# del (authorized)

Cancels a specific pending order

**POST pending/authorized/del**

{% hint style="info" %}
Method is similar to the `api/del`
{% endhint %}

{% tabs %}
{% tab title="Payload" %}

```json
{
    "clientId": int,
    "orderId": "int",
    "clientOrderId": "int"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": "int",
    "remainingSize": "int"
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": "int"
}
```

{% endtab %}
{% endtabs %}


# delAll

Cancels all pending orders for a specified instrument.

**POST pending/delAll**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "instrument": "string"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "removed": "int"
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": "int"
}
```

{% endtab %}
{% endtabs %}


# delAll (authorized)

Cancels all pending orders for a specified instrument.

**POST pending/delAll**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "clientId": int,
    "instrument": "string" (optional, if not specified then cancels all client pending orders)
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "removed": "int"
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": "int"
}
```

{% endtab %}
{% endtabs %}


# \[DEPRECATED] add (pending limit order)

Places a pending limit order at a specified price. The taker can define either the order size or the volume

**POST pending/add**

{% hint style="warning" %}
This is a deprecated API. Please, migrate to use of [/algo/authorized/order/add](https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/rest-api/trading/order-book-and-qs/algo-orders/authorized-operations/algo-authorized-order-add)
{% endhint %}

{% hint style="info" %}
Method works similar to the `api/add`

Please note, that pending QS orders are not available yet. QS-related fields will be ignored.
{% endhint %}

{% tabs %}
{% tab title="Payload" %}

```json
{
    "instrument": "string",
    "clientOrderId": "int",
    "price": "int",
    "size": "int",
    "volume": "int",
    "side": "string" // "ask" or "bid" (case-insensitive)
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": "int",
    "clientOrderId": "int",
    "cancelReason": "int"
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": "int"
}
```

{% endtab %}
{% endtabs %}

**Response description**

• **Cancel Reason:** Specifies why an order was canceled (e.g., user action, system failure).


# \[DEPRECATED] add (pending limit order) (authorized)

Places a pending limit order at a specified price. A master can define either the order size or the volume

**POST pending/authorized/add**

{% hint style="warning" %}
This is a deprecated API. Please, migrate to use of [/algo/authorized/order/add](https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/rest-api/trading/order-book-and-qs/algo-orders/authorized-operations/algo-authorized-order-add)
{% endhint %}

{% hint style="info" %}
Method works similar to the `api/add`

Please note, that authorized pending QS orders are not available yet. QS-related fields will be ignored.
{% endhint %}

{% tabs %}
{% tab title="Payload" %}

```json
{
    "clientId": int,
    "instrument": "string",
    "clientOrderId": "int",
    "price": "int",
    "size": "int",
    "volume": "int",
    "side": "string" // "ask" or "bid" (case-insensitive)
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": "int",
    "clientOrderId": "int",
    "cancelReason": "int"
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": "int"
}
```

{% endtab %}
{% endtabs %}

**Response description**

• **Cancel Reason:** Specifies why an order was canceled (e.g., user action, system failure).


# \[DEPRECATED] orders

Retrieves details of pending limit orders

{% hint style="warning" %}
This is a deprecated API. Please, migrate to use of [/algo/orders](https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/rest-api/trading/order-book-and-qs/algo-orders/regular-operations/algo-orders)
{% endhint %}

**POST pending/orders**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "pageSize": "int",
    "pageNumber": "int",
    "from": "int (timestamp)",
    "to": "int (timestamp)",
    "instruments": ["string"],
    "statuses": ["string"],
    "side": "string" // "bid" or "ask" (case-insensitive)
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": "int",
    "clientId": "int",
    "instrument": "string",
    "status": "string",
    "createdAt": "int (timestamp)",
    "size": "int (optional)",
    "volume": "int (optional)",
    "remainingVolumeOrSize": "int"
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": "int"
}
```

{% endtab %}
{% endtabs %}

**Response description**

• **Statuses:** PENDING, COMPLETED, or CANCELED


# \[DEPRECATED] orders (authorized)

Retrieves details of pending limit orders

{% hint style="warning" %}
This is a deprecated API. Please, migrate to use of [/algo/authorized/orders](https://app.gitbook.com/o/-MdGV_UNcoyY7eJyul_c/s/lhEtVTUclDpcNfjGvCeB/~/edit/~/changes/439/api-reference/rest-api/trading/order-book-and-qs/algo-orders/authorized-operations/algo-authorized-orders)
{% endhint %}

**POST pending/authorized/orders**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "clientId": "int",
    "pageSize": "int",
    "pageNumber": "int",
    "from": "int (timestamp)",
    "to": "int (timestamp)",
    "instruments": ["string"],
    "statuses": ["string"],
    "side": "string" // "bid" or "ask" (case-insensitive)
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": "int",
    "clientId": "int",
    "instrument": "string",
    "status": "string",
    "createdAt": "int (timestamp)",
    "size": "int (optional)",
    "volume": "int (optional)",
    "remainingVolumeOrSize": "int"
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": "int"
}
```

{% endtab %}
{% endtabs %}

**Response description**

• **Statuses:** PENDING, COMPLETED, or CANCELED


# mod

Replaces an order

{% hint style="info" %}
/mod method makes sense only for makers, since taker's orders are processed immediately and a server does not store them.
{% endhint %}

Please note that in case of replacing a partially filled order the size of a newly replaced order will be less than the specified size by the filled amount (e.g., the size of an initial order was 10; then the order was partially filled and the remaining size was 8; when a user replaces this order, a new size must be 12 if a user wants to have 10 in the order book).

Please also note it is not possible to replace an order by `clientOrderId`.&#x20;

{% hint style="info" %}
Using `/mod` command instead of `add/del` is highly recommendable for makers.
{% endhint %}

**POST api/mod**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "orderId": 1235,
    "price": 1000000000000,
    "size": 20000000
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": 1246,
    "initialSize": 18000000,
    "remainingSize": 18000000,
    "deals": [ ],
    "origId": 1245,
    "origRemainingSize": 8000000
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}

"mod" is the only method that may have a different format of an error response

{
    "reply": {
        "error": 74,
        "origId": 42,
        "origRemainingSize": 10000
    }
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name    | Type               | Description                                                                                       |
| ------------- | ------------------ | ------------------------------------------------------------------------------------------------- |
| orderId       | Efx::OrderId       | Id of order to replace                                                                            |
| clientOrderId | Efx::ClientOrderId | *Optional* user data attached to a new order                                                      |
| price         | Efx::Price         | New Price                                                                                         |
| size          | Efx::Size          | Initial size of replace result will be size - (old order initial size - old order remaining size) |

**Response description**

| Field name        | Type           | Description                                                                                                                                                                                               |
| ----------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| error             | Efx::ErrorCode | Will be returned alongside with `origId` and `origRemainingSize` in case old order was removed but new order cannot be placed. In case old order cannot be removed standard error reply will be returned. |
| id                | Efx::OrderId   | New Order Id                                                                                                                                                                                              |
| initialSize       | Efx::Size      | New Order initial size                                                                                                                                                                                    |
| remainingSize     | Efx::Size      | New Order remaining size (after aggressive deals)                                                                                                                                                         |
| cancelReason      | unsigned int16 | <p>Cancel reason</p><p>0 - in place or filled</p><p>1 - by client</p><p>2 - as non-book order</p><p>3 - by self-trade prevention</p><p>4 - cancel-on-disconnect</p>                                       |
| origId            | Efx::OrderId   | Original Order Id                                                                                                                                                                                         |
| origRemainingSize | Efx::Size      | Original Order size on removal                                                                                                                                                                            |
| deals             | Array of Deals | Initial (taker) deals                                                                                                                                                                                     |
| **Deal**          | Array\[6]      |                                                                                                                                                                                                           |
| id                | Efx::DealId    | Deal Id                                                                                                                                                                                                   |
| price             | Efx::Price     | Deal price                                                                                                                                                                                                |
| size              | Efx::Size      | DealSize                                                                                                                                                                                                  |
| volume            | Efx::Size      | Deal volume                                                                                                                                                                                               |
| delta             | Efx::Size      | Deal delta in quote (balance) currency                                                                                                                                                                    |
| counterpartyId    | Efx::ClientId  | Counterparty id                                                                                                                                                                                           |


# del

Cancels an order

{% hint style="info" %}
/del method makes sense only for makers, since taker's orders are processed immediately and a server does not store them.
{% endhint %}

Please note that it is not possible to specify `orderId` *and* `clientOrderId` simultaneously.

**POST api/del**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "orderId": 1235
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "id": 1235,
    "remainingSize": 8000000
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Filed name    | Type               | Description                                                                 |
| ------------- | ------------------ | --------------------------------------------------------------------------- |
| orderId       | Efx::OrderId       | Id of order to delete (either this or `clientOrderId` should be specified)  |
| clientOrderId | Efx::ClientOrderId | Client Id of order to delete (either this or `orderId` should be specified) |

**Response description**

| Field name    | Type         | Description                     |
| ------------- | ------------ | ------------------------------- |
| id            | Efx::OrderId | Order Id                        |
| remainingSize | Efx::Size    | Remaining Order size on removal |


# delAll

Cancels all client orders or all client orders for instrument if specified

{% hint style="info" %}
/delAll method makes sense only for makers, since taker's orders are processed immediately and a server does not store them.
{% endhint %}

**POST api/delAll**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "instrument": "BTC-USD"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "removed": 15
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name | Type   | Description                   |
| ---------- | ------ | ----------------------------- |
| instrument | string | *Optional*. Instrument filter |

**Response description**

| Filed name | Type           | Description                |
| ---------- | -------------- | -------------------------- |
| removed    | unsigned int32 | Number of cancelled orders |


# getAvailableQsProviders

Returns the list of available providers to take from

**POST api/qs/getAvailableQsProviders**

### Request

{% tabs %}
{% tab title="Schema" %}

```json
{
  "instrument": <string>
}
```

{% endtab %}

{% tab title="Example" %}

```json
{
  "instrument": "BTC-USD"
}
```

{% endtab %}
{% endtabs %}

#### Request Fields

| Field      | Type   | Description               |
| ---------- | ------ | ------------------------- |
| instrument | string | Instrument name, optional |

### Response

{% tabs %}
{% tab title="Schema" %}

```json
{
  "providers": {
    "<instrument_name>": [
      <Efx::ClientId>
    ]
  },
  "providerSupportedOrderTypes": {
    "<Efx::ClientId>": [<string>]
  }
}
```

{% endtab %}

{% tab title="Example" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong><strong>  "providers": {
</strong>    "BTC-EUR": [1],
    "BTC-USD": [1]
  },
  "providerSupportedOrderTypes": {
    "1": ["limitFOK", "limitIOC"]
  }
}
</code></pre>

{% endtab %}
{% endtabs %}

#### Response Fields

| Field                       | Type  | Description                                                                                                                                                                                                |
| --------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| providers                   | dict  |                                                                                                                                                                                                            |
| \<instrument\_name>         | array | List of IDs for available providers for the instrument \<instrument\_name>                                                                                                                                 |
| providerSupportedOrderTypes | dict  |                                                                                                                                                                                                            |
| \<Efx::ClientID>            | array | <p>List of taker order types supported by the provider with the corresponding FM ID.</p><p>The array may contain one or more of the following values: "limitFOK", "limitIOC", "marketFOK", "marketIOC"</p> |


# RFQ

The list of methods to retrieve settings, list of available providers, and  request trade history please utilize the following methods is available in this page tree


# getSettings

**POST /api/rfq/getSettings**

{% tabs %}
{% tab title="Payload" %}

```json
Headers:
{
EFX-Key: string
EFX-Sign: string
}
Body:
{
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
'clientId': int,
'tradingEnabled': boolean,
'viewingEnabled': boolean
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
'error': int,
'errors': string
}
```

{% endtab %}
{% endtabs %}


# getSettings (authorized)

**POST /api/rfq/authorized/getSettings**

{% tabs %}
{% tab title="Payload" %}

```json
Headers:
{
EFX-Key: string
EFX-Sign: string
}
Body:
{
'clientId': int
}
```

{% endtab %}

{% tab title="200 OK" %}

<pre class="language-json"><code class="lang-json">{
'clientId': int,
<strong>'tradingEnabled': boolean,
</strong>'viewingEnabled': boolean
}
</code></pre>

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
'error': int,
'errors': string
}
```

{% endtab %}
{% endtabs %}


# getUserSettings (authorized)

Get info about sub-account RFQ settings for user

**POST /api/rfq/authorized/getUserSettings**

{% tabs %}
{% tab title="Payload" %}

```json
Headers:
{
EFX-Key: string
EFX-Sign: string
}
Body:
{
"clientId": int
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
"favoriteInstruments" : string[]
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
"error": int,
"errors": string
}
```

{% endtab %}
{% endtabs %}


# setUserSettings (authorized)

Set info about sub-account RFQ settings for user

**POST /api/rfq/authorized/setUserSettings**

{% tabs %}
{% tab title="Payload" %}

```json
Headers:
{
EFX-Key: string
EFX-Sign: string
}
Body:
{
"clientId": int,
"favoriteInstruments": string[]
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
"error": int,
"errors": string
}
```

{% endtab %}
{% endtabs %}


# getProviders

**POST /api/rfq/getProviders** - get info about available RFQ providers

{% tabs %}
{% tab title="Payload" %}

```json
Headers:
{
EFX-Key: string
EFX-Sign: string
}
Body:
{}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
'providers': [
  {
    'id': int,
    'clientId': string,
    'clientName': string,
    'adapterType': string(enum),
    'instruments': string[]
  }
]
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
'error': int,
'errors': string
}
```

{% endtab %}
{% endtabs %}


# getSessions

**POST /rfq/getSessions** - get info about RFQs

{% tabs %}
{% tab title="Payload" %}

```json
Headers:
{
EFX-Key: string
EFX-Sign: string
}
Body (params are optional):
{
    "pageSize": int,
    "pageNumber": int,
    "from": int(timestamp),
    "to": int(timestamp),
    "instruments": string[],
    "counterpartyIds": int[],
    "statuses": string[]
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    'content': [
        {
            "id": int,
            "counterpartyId": int,
            "counterpartyName": string,
            "instrumentName": string,
            "side": string ("BUY"/"SELL"),
            "price": int,
            "size": int,
            "status": string ("CREATED", "COMMITTED", "CANCELED", "EXPIRED"),
            "date": int(timestamp),
            "tradeId": int
        }
        ...
        ],
    "totalElements": int,
    "totalPages": int,
    "size": int,
    "number": int
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
'error': string
}
```

{% endtab %}
{% endtabs %}


# Deals & Positions


# positions

Returns next deal id, positions, orders and settlement orders snapshot

**POST api/positions**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "filter": "all"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    5,
    [
        [ 
            "BTC",        // Posititon Currency
            -10000000,    // Value
            2,            // Counterparty id
            0,            // Max reachable position, if the settlement order is committed
            -10000000     // Min reachable position
        ],
        [
            "USD",
            100000000000,
            2,
            100000000000,
            0,
        ]
    ],
    [
        [
            "BTC-USD",     // Order instrument
            0,             // Order type
            0,             // Side
            0,             // Cancel reason
            1234,          // Order id
            0,             // Client order id 
            999900000000,  // Price
            10000000,      // Size or volume
            8000000,       // Remaining size or volume
            1558051200000, // Created at
            0              // created by size or volume
        ]
    ],
    [
        [
            1229,          // Settlement order id
            "BTC",         // Currency 1
            "USD",         // Currency 2
            10000000,      // Size 1
            100000000000,  // Size 2
            1558050900000, // Created at
            2,             // Counterparty id
            "BTC",         // Network name 1
            ""             // Network name 2 (not specified)    
        ]
    ]
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name | Type   | Description                                                                                                                                                                                                                                                                      |
| ---------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filter     | string | <p><em>Optional</em> <em>field</em> for master accounts only (FM Liquidity Match).<br>- absent or "all": returns positions for all counterparties<br>- "subaccounts": returns  positions for the sub-accounts<br>- "external": returns positions for external counterparties</p> |

#### Response description

| Fiels name          | Type                      | Description                                                                                                                                                                                 |
| ------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                     | Array\[4]                 | Array or 4 elements                                                                                                                                                                         |
| 0                   | Efx::DealId               | Next Deal or Settlement Id                                                                                                                                                                  |
| 1                   | Array of Positions        | Asset Positions                                                                                                                                                                             |
| 2                   | Array of Orders           | Active Orders *(for makers only)*                                                                                                                                                           |
| 3                   | Array of SettlementOrders | Active Settlement Orders                                                                                                                                                                    |
| **Position**        | Array\[3]                 |                                                                                                                                                                                             |
| 0                   | string                    | Currency name                                                                                                                                                                               |
| 1                   | Efx::Size                 | Value                                                                                                                                                                                       |
| 2                   | Efx::ClientId             | Counterparty Id                                                                                                                                                                             |
| 3                   | Efx::Size                 | [Max reachable position](https://faq.finerymarkets.com/api-reference/rest-api/deals-and-positions/pages/ZUQoVImm7uH6Fljm2jUL#id-5.-what-is-max-min-reachable-position)                      |
| 4                   | Efx::Size                 | [Min reachable position](https://faq.finerymarkets.com/api-reference/rest-api/deals-and-positions/pages/ZUQoVImm7uH6Fljm2jUL#id-5.-what-is-max-min-reachable-position)                      |
| **Order**           | Array\[11]                |                                                                                                                                                                                             |
| 0                   | string                    | Instrument name                                                                                                                                                                             |
| 1                   | unsigned int16            | <p>Order Type</p><p>0 - limit</p><p>1 - post only</p><p>2 - limit IOC</p><p>3 - limit FOK</p><p>4 - market IOC</p><p>5 - market FOK<br>6 - manual trade<br>7 - pending limit<br>9 - RFQ</p> |
| 2                   | Efx::Side                 | <p>Side</p><p>0 - bid</p><p>1 - ask</p>                                                                                                                                                     |
| 3                   | unsigned int16            | <p>Cancel reason</p><p>0 - in place or filled</p><p>1 - by client</p><p>2 - as non-book order</p><p>3 - by self-trade prevention</p><p>4 - cancel-on-disconnect</p>                         |
| 4                   | Efx::OrderId              | Order Id                                                                                                                                                                                    |
| 5                   | Efx::ClientOrderId        | Client Order Id                                                                                                                                                                             |
| 6                   | Efx::Price                | Order price                                                                                                                                                                                 |
| 7                   | Efx::Size                 | Order Initial Size Or Volume (Depending on Order was initially created by size or volume)                                                                                                   |
| 8                   | Efx::Size                 | Remaining Order Size Or Volume (Depending on Order was initially created by size or volume)                                                                                                 |
| 9                   | Efx::Timestamp            | Created At                                                                                                                                                                                  |
| 10                  | unsigned int16            | <p>If order was created by size or by volume</p><p>0 - by size</p><p>1 - by volume</p>                                                                                                      |
| **SettlementOrder** | Array\[9]                 |                                                                                                                                                                                             |
| 0                   | Efx::OrderId              | Settlement order id                                                                                                                                                                         |
| 1                   | string                    | Currency 1                                                                                                                                                                                  |
| 2                   | string                    | Currency 2                                                                                                                                                                                  |
| 3                   | Efx::Size                 | Size 1                                                                                                                                                                                      |
| 4                   | Efx::Size                 | Size 2                                                                                                                                                                                      |
| 5                   | Efx::Timestamp            | Created At                                                                                                                                                                                  |
| 6                   | Efx::ClientId             | Counterparty id                                                                                                                                                                             |
| 7                   | string                    | Newtork 1 or empty                                                                                                                                                                          |
| 8                   | string                    | Network 2 or empty                                                                                                                                                                          |


# dealHistory

Returns deal history.

{% hint style="info" %}
&#x20;If the number of deals in the specified period may exceed the limit, the request returns 250 latest deals. To get other deals, a user needs to remember the earliest `DealId` and specify it in the next request(s).
{% endhint %}

**POST api/dealHistory**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "instrument": "BTC-USD",
    "filter": "all"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    [
        "BTC-USD",       // Instrument name
        0,               // Order type
        0,               // Side
        0,               // Cancel reason
        1234,            // Order id
        0,               // Client order id
        9900000000,      // Order price
        10000000,        // Order initial size or volume
        9998000,         // Remaining order size or volume
        1558051200000,   // Order created at
        1558052600000,   // Deal moment
        12,              // Deal id
        1,               // Deal aggressor side
        9900000000,      // Deal price
        2000,            // Deal size
        19800000000000,  // Deal volume
        100000,          // Deal delta
        14,              // Counterparty id
        0,               // Order created by size or volume
        10,              // Taker order owner id
        0,               // Linked deal id
        0,               // Deal type
        15,              // Maker order owner id
        0,               // Liquidity source
        100000000        // Balance currency price in USD
    ]
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name      | Type                | Description                                                                                                                                                                                                                                                            |
| --------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| instrument      | Array \<string>     | <p>Instrument names.</p><p>If specified only return deals for these instruments</p>                                                                                                                                                                                    |
| counterpartyIds | Array Efx::ClientId | Counterparty Ids. If specified only return deals for these counterparties                                                                                                                                                                                              |
| filter          | string              | <p><em>Optional</em> <em>field</em> for master accounts only (FM Liquidity Match).<br>- absent or "all": returns full deals history<br>- "subaccounts": returns deals history with subaccounts<br>- "external": returns deals history with external counterparties</p> |
| till            | Efx::DealId         | If specified only return deals with lesser ID                                                                                                                                                                                                                          |
| from            | Efx::Timestamp      | If specified only return deals with equal or greater timestamp                                                                                                                                                                                                         |
| to              | Efx::Timestamp      | If specified only return deals with lesser timestamp                                                                                                                                                                                                                   |
| limit           | unsigned int16      | <p>Default: 250</p><p>Maximum number of deals to return (capped at 250)</p>                                                                                                                                                                                            |

**Response description**

| Feild name | Type                 | Description                                                                                                                                                                                 |
| ---------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|            | Array of Deals       |                                                                                                                                                                                             |
| **Deal**   | Array\[21]           |                                                                                                                                                                                             |
| 0          | string               | Instrument name                                                                                                                                                                             |
| 1          | unsigned int16       | <p>Order Type</p><p>0 - limit</p><p>1 - post only</p><p>2 - limit IOC</p><p>3 - limit FOK</p><p>4 - market IOC</p><p>5 - market FOK<br>6 - manual trade<br>7 - pending limit<br>9 - RFQ</p> |
| 2          | Efx::Side            | <p>Side</p><p>0 - bid</p><p>1 - ask</p>                                                                                                                                                     |
| 3          | unsigned int16       | <p>Cancel reason</p><p>0 - in place or filled</p><p>1 - by client</p><p>2 - as non-book order</p><p>3 - by self-trade prevention</p><p>4 - cancel-on-disconnect</p>                         |
| 4          | Efx::OrderId         | Order id                                                                                                                                                                                    |
| 5          | Efx::ClientOrderId   | Client order id                                                                                                                                                                             |
| 6          | Efx::Price           | Order price                                                                                                                                                                                 |
| 7          | Efx::Size            | Order Initial Size Or Volume (depending on whether order was initiated by volume)                                                                                                           |
| 8          | Efx::Size            | Remaining Order Size Or Volume after deal (depending on whether order was initiated by volume)                                                                                              |
| 9          | Efx::Timestamp       | Order Created At                                                                                                                                                                            |
| 10         | Efx::Timestamp       | Deal Moment                                                                                                                                                                                 |
| 11         | Efx::DealId          | Deal id                                                                                                                                                                                     |
| 12         | Efx::Side            | <p>Deal aggressor side</p><p>0 - bid</p><p>1 - ask</p>                                                                                                                                      |
| 13         | Efx::Price           | Deal price                                                                                                                                                                                  |
| 14         | Efx::Size            | Deal size                                                                                                                                                                                   |
| 15         | Efx::Size            | Deal volume                                                                                                                                                                                 |
| 16         | Efx::Size            | Deal delta in quote (balance) currency                                                                                                                                                      |
| 17         | Efx::ClientId        | Counterparty id                                                                                                                                                                             |
| 18         | unsigned int16       | <p>If order was created by size or by volume</p><p>0 - by size</p><p>1 - by volume</p>                                                                                                      |
| 19         | Efx::ClientId        | Id of a taker who placed the order                                                                                                                                                          |
| 20         | Efx::DealId          | Deal ID current deal is linked to. Deals can be linked when trade happens through the master's account.                                                                                     |
| 21         | DealType             | <p>0 - regular<br>1 - authorized trade<br>2 - liquidation trade</p>                                                                                                                         |
| 22         | Efx::ClientId        | Id of a maker who placed the order                                                                                                                                                          |
| 23         | Efx::LiquiditySource | Source of the liquidity for the deal                                                                                                                                                        |
| 24         | Efx::Price           | Balance currency price in USD                                                                                                                                                               |


# dealHistory (authorized)

Returns deal history on behalf of a client. Only for masters

**POST api/authorized/dealHistory**

{% hint style="info" %}
Method works similar to the `api/dealHistory` with `clientId` additional field
{% endhint %}

{% tabs %}
{% tab title="Payload" %}

```json
{
    "clientId": 1,
    "instrument": "BTC-USD",
    "filter": "all"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    [
        "BTC-USD",       // Instrument name
        0,               // Order type
        0,               // Side
        0,               // Cancel reason
        1234,            // Order id
        0,               // Client order id
        9900000000,      // Order price
        10000000,        // Order initial size or volume
        9998000,         // Remaining order size or volume
        1558051200000,   // Order created at
        1558052600000,   // Deal moment
        12,              // Deal id
        1,               // Deal aggressor side
        9900000000,      // Deal price
        2000,            // Deal size
        19800000000000,  // Deal volume
        100000,          // Deal delta
        14,              // Counterparty id
        0,               // Order created by size or volume
        10,              // Taker order owner id
        0,               // Linked deal id
        0,               // Deal type
        15,              // Maker order owner id
        0,               // Liquidity source
        100000000        // Balance currency price in USD    
    ]
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}


# Risk Management

Read more about Risk Management here

{% content-ref url="/pages/UO2hdwUGgXhb7kkaEiCn" %}
[Risk Management](/product-features/risk-management)
{% endcontent-ref %}


# climits

Returns Counterparty limits snapshot

**POST api/climits**

{% tabs %}
{% tab title="Payload" %}

```
{}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
  {
    "counterpartyId": 5,
    "tradingPermissions": {
      "ownTradingEnabled": true,
      "mutualTradingEnabled": false
    },
    "ownLimit": {
      "grossLimit": 1000000000,
      "asset": "BTC",
      "limitUtilization": 5000000,
      "equity": 300000,
      "maintenanceMargin": 1000,
      "restrictedTrading": 2000,
      "initialMargin": 3000
    },
    "mutualLimit": {
      "grossLimit": 500000000000,
      "asset": "USD",
      "limitUtilization": 1000000000,
      "equity": -300000,
    }
  },
  {
    "counterpartyId": 10,
    "tradingPermissions": {
      "ownTradingEnabled": true,
      "mutualTradingEnabled": true,
      "ownIncomingFlowEnabled": true,
      "ownOutgoingFlowEnabled": false,
      "mutualIncomingFlowEnabled": true,
      "mutualOutgoingFlowEnabled": true
    },
    "ownLimit": {
      "grossLimit": 500000000000,
      "asset": "USD",
      "limitUtilization": 0,
      "equity": 0
    }
  }
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Response description**

<table><thead><tr><th>Field name</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td></td><td>Array of CLimits</td><td>Array of counterparty limits</td></tr><tr><td><strong>CLimit</strong></td><td>Dict</td><td></td></tr><tr><td>counterpartyId</td><td>Efx::ClientId</td><td>Counteraparty Id </td></tr><tr><td>tradingPermissions</td><td>TradingPermissions</td><td>Own and mitual trading permissions.</td></tr><tr><td>ownLimit</td><td>LimitData</td><td><em>Optional.</em> Own limit data, present only if the own gross limit exists.</td></tr><tr><td>mutualLimit</td><td>LimitData</td><td><em>Optional.</em> Mutual limit data, present only if the counterparty set the gross limit.</td></tr><tr><td><strong>LimitData</strong></td><td>Dict</td><td></td></tr><tr><td>grossLimit</td><td>Efx::Size</td><td>Gross limit value.</td></tr><tr><td>asset</td><td>string</td><td>Gross limit currency name.</td></tr><tr><td>limitUtilization</td><td>Efx::Size</td><td>Maintenance margin.<br>In % multiplied by 1e4.</td></tr><tr><td>equity</td><td>Efx::Size</td><td>Equity.</td></tr><tr><td>maintenanceMargin</td><td>int32</td><td><em>Optional.</em> Maintenance margin.<br>In % multiplied by 1e4.</td></tr><tr><td>restrictedTrading</td><td>int32</td><td><em>Optional.</em> Restricted trading level.<br>In % multiplied by 1e4.</td></tr><tr><td>initialMargin</td><td>int32</td><td><em>Optional.</em> Initial margin.<br>In % multiplied by 1e4.</td></tr><tr><td><strong>TradingPermissions</strong></td><td>Dict</td><td></td></tr><tr><td>ownTradingEnabled</td><td>bool</td><td>True if trading enabled by client.</td></tr><tr><td>mutualTradingEnabled</td><td>bool</td><td>True if trading enabled by counterparty.</td></tr><tr><td>ownIncomingFlowEnabled</td><td>bool</td><td><em>Optional</em>.  Field is present only for master-master connection. True if incoming flow from counterparty master is enabled by master client.</td></tr><tr><td>ownOutgoingFlowEnabled</td><td>bool</td><td><em>Optional</em>.  Field is present only for master-master connection. True if outgoing flow to counterparty master is enabled by master client.</td></tr><tr><td>mutualIncomingFlowEnabled</td><td>bool</td><td><em>Optional</em>.  Field is present only for master-master connection. True if counterparty master enabled incoming flow from the master client.</td></tr><tr><td>mutualOutgoingFlowEnabled</td><td>bool</td><td><em>Optional</em>.  Field is present only for master-master connection. True if counterparty master enabled outgoing flow to the master client.</td></tr></tbody></table>


# setCLimit

Sets or modifies a counterparty limit

**POST api/setCLimit**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
    "currency": "EUR",
    "grossLimit": 15000000000000,
    "maintenanceMargin": 1000, // For makers and masters only
    "restrictedTrading": 1500, // For makers and masters only
    "initialMargin": 2000
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name        | Type          | Description                                                                                                                                                                                                                        |
| ----------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| counterpartyId    | Efx::ClientId | Counterparty Id                                                                                                                                                                                                                    |
| currency          | string        | Currency name                                                                                                                                                                                                                      |
| grossLimit        | Efx::Size     | Gross limit size                                                                                                                                                                                                                   |
| maintenaceMargin  | Efx::Percent  | <p><em>Optional. For makers and masters only!</em><br>Maintenance margin level.<br>In % multiplied by 1e4.<br>From 0 to 1000000, that is 0% to 100% of gross limit.</p>                                                            |
| restrictedTrading | Efx::Percent  | <p><em>Optional. For makers and masters only!</em><br>Restricted trading level.<br>In % multiplied by 1e4.<br>From 0 to 1000000, that is 0% to 100% of gross limit.<br>Should be greater or equal to the maintenance margin.</p>   |
| initialMargin     | Efx::Percent  | <p><em>Optional. For makers and masters only!</em><br>Initial margin level.<br>In % multiplied by 1e4.<br>From 0 to 1000000, that is 0% to 100% of gross limit.<br>Should be greater or equal to the restricted trading level.</p> |

{% hint style="info" %}
Only one limit could be set against the counterparty.

Setting the new limit will modify the existing one.
{% endhint %}


# delCLimit

Deletes counterparty limit

**POST api/delCLimit**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}    
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name     | Type          | Description     |
| -------------- | ------------- | --------------- |
| counterpartyId | Efx::ClientId | Counterparty Id |


# enableTrading

Enables trading against counterparty. Enables both incoming and outgoing liquidity flows between two masters.

#### POST api/enableTrading

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad Requets" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

#### Request parameters

| Field name     | Type          | Description     |
| -------------- | ------------- | --------------- |
| counterpartyId | Efx::ClientId | Counterparty Id |


# disableTrading

Disables trading against counterparty. Disables both incoming and outgoing liquidity flows between two masters.

#### POST api/disableTrading

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad Requets" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

#### Request parameters

| Field name     | Type          | Description     |
| -------------- | ------------- | --------------- |
| counterpartyId | Efx::ClientId | Counterparty Id |


# enableIncomingLiquidity

For masters enables incoming liquidity from counterparty master.

#### POST api/enableIncomingLiquidity

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad Requets" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

#### Request parameters

| Field name     | Type          | Description     |
| -------------- | ------------- | --------------- |
| counterpartyId | Efx::ClientId | Counterparty Id |


# disableIncomingLiquidity

For masters disables incoming liquidity from counterparty master.

#### POST api/disableIncomingLiquidity

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad Requets" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

#### Request parameters

| Field name     | Type          | Description     |
| -------------- | ------------- | --------------- |
| counterpartyId | Efx::ClientId | Counterparty Id |


# enableOutgoingLiquidity

For masters enables outgoing liquidity to counterparty master.

#### POST api/enableOutgoingLiquidity

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad Requets" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

#### Request parameters

| Field name     | Type          | Description     |
| -------------- | ------------- | --------------- |
| counterpartyId | Efx::ClientId | Counterparty Id |


# disableOutgoingLiquidity

For masters disables outgoing liquidity to counterparty master.

#### POST api/disableOutgoingLiquidity

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad Requets" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

#### Request parameters

| Field name     | Type          | Description     |
| -------------- | ------------- | --------------- |
| counterpartyId | Efx::ClientId | Counterparty Id |


# cAssetLimits

Returns Counterparty limits by asset snapshot

**POST api/cAssetLimits**

{% tabs %}
{% tab title="Payload" %}

```
{}
```

{% endtab %}

{% tab title="200 OK" %}

```json
[
    [
        1,            // Counterparty id
        "BTC",        // Asset name
        100000000,    // Long position limit, may be null
        200000000,    // Short position limit, may be null
        "BTC",        // Limit currency
        null,         // CP's long position limit, may be null
        null,         // CP's short position limit, may be null
        null,         // CP's gross limit currency
    ],
    [
        1,            // Counterparty id
        "USD",        // Asset name
        15000000000,  // Long position limit, may be null
        20000000000,  // Short position limit, may be null
        "EUR",        // Limit currency
        12000000000,  // CP's long position limit, may be null
        null,         // CP's short position limit, may be null
        null,         // CP's gross limit currency
    ],
    [
        2,            // Counterparty id
        "BTC",        // Asset name
        100000000,    // Long position limit, may be null
        0,            // Short position limit, may be null
        "BTC",        // Limit currency
        15000000000,  // CP's long position limit, may be null
        15000000000,  // CP's short position limit, may be null
        "USD",        // CP's gross limit currency
    ]
]
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name     | Type          | Description                                                                                                                                                                                                                                                                 |
| -------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| counterpartyId | Efx::ClientId | <p><em>Optional</em>. Returns limits by asset for specified counterparty.<br>Returns limits by asset for all counterparties otherwise.</p>                                                                                                                                  |
| filter         | string        | <p><em>Optional</em> <em>field</em> for master accounts only (FM Liquidity Match).<br>- absent or "all": returns all asset limits<br>- "subaccounts": returns all asset limits with sub-accounts<br>- "external": returns all asset limits with external counterparties</p> |

**Response description**

| Field name      | Type                  | Description                                  |
| --------------- | --------------------- | -------------------------------------------- |
|                 | Array of cAssetLimits | Array of counterparty asset limits           |
| **cAssetLimit** | Array\[6]             |                                              |
| 0               | Efx::ClientId         | Counterparty Id                              |
| 1               | string                | Asset for which the limit is set             |
| 2               | Efx::Size \| null     | Your limit on counterparty's long position   |
| 3               | Efx::Size \| null     | Your limit on counterparty's  short position |
| 4               | string                | Limit value currency                         |
| 5               | Efx::Size \| null     | Counterparty’s limit on your long position   |
| 6               | Efx::Size \| null     | Counterparty’s limit on your short position  |
| 7               | string                | CP’s limit value currency. May be null.      |

{% hint style="info" %}
The gross limit exposure per asset equals to absolute value of the asset position against any given counterparty.
{% endhint %}


# setCAssetLimit

Sets or modifies a counterparty asset limit

**POST api/setCAssetLimit**

{% tabs %}
{% tab title="Payload" %}

```json
{
    "counterpartyId": 4,
    "asset": "EUR",
    "shortPositionLimit": 15000000000000,
    "longPositionLimit": 20000000000000,
    "limitCurrency": "USD"
}
```

{% endtab %}

{% tab title="200 OK" %}

```json
{
    "error": 0
}
```

{% endtab %}

{% tab title="400 Bad request" %}

```json
{
    "error": 2
}
```

{% endtab %}
{% endtabs %}

**Request parameters**

| Field name         | Type          | Description                         |
| ------------------ | ------------- | ----------------------------------- |
| counterpartyId     | Efx::ClientId | Counterparty Id                     |
| asset              | string        | Asset for which the limit is set    |
| shortPositionLimit | Efx::Size     | Limit counterparty's short position |
| longPositionLimit  | Efx::Size     | Limit counterparty's long position  |
| limitCurrency      | string        | Limit value currency                |




---

[Next Page](/llms-full.txt/1)

