Automated Settlements
Do you offer automated settlements?
Yes, we provide the technological infrastructure to automate the settlement process. Our API can provide the necessary data and commands to communicate with your custody providers, both crypto and fiat (if your bank support API integrations)
Would I need to settle every trade?
No, you may have open positions for a minimum of one trading day
How would I use API to settle my open positions?
For example:
Make a request to https://faq.finerymarkets.com/api-reference/rest-api/positions to fetch your current positions
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
You settle your side first
You create https://faq.finerymarkets.com/api-reference/rest-api/addoutgoingsettlementtransaction
Insert data from Positions (step 1) there (counterparty ID, currency, size (must exactly match what the LP will receive) and send a request
In response, you receive transactionID, which must be saved for insertion into the following step.
Your custody provider (for example Fireblocks) creates a transfer according to the parameters from paragraph. 6 to the liquidity provider [LP](its wallets do not change and you receive them after completing the onboarding)
After Fireblocks has sent the crypto, it is important to collect the blockchain hash of the transfer
After receiving the crypto hash of the transfer you perform another command: https://faq.finerymarkets.com/api-reference/rest-api/sendoutgoingsettlementtransaction
In this command, you need to insert the hash from the Fireblocks translation into the TXID field and "transactionId" from the response from paragraphs. 7
You create a request for the funds you wish to receive using https://faq.finerymarkets.com/api-reference/rest-api/addincomingsettlementrequest
Either specifying only the currency (The LP will send everything that can be withdrawn) or specifying the currency and the size
You will need to make requests to the https://faq.finerymarkets.com/api-reference/rest-api/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 section Incoming settlement transactions
Once the funds have landed in your accounts, you need to make the command https://faq.finerymarkets.com/api-reference/rest-api/commitincomingsettlementtransaction
Last updated