Automated Settlements

Do you offer automated settlements?

Yes, we provide the technological infrastructure to automate the settlement process. Our API can supply the necessary data and commands to communicate with your custody providers, both crypto and fiat (if your bank supports API integrations).

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 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; 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

  9. In this command, you need to insert the hash from the Fireblocks translation 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, 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 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 command to commit.

Last updated