Liquidity

This walkthrough covers the scenario where you trade directly against Fuze.

Introduction

Once your account is created, you'll be assigned an "Org Id" and a keys to hit our APIs. An "org" in of itself doesn't have balances. Instead it has "users" against whom trades and transfers are recorded. In other words, the ledgers are maintained at a user-level.

Given that the transactions here are directly between the Org and Fuze - the users here are "internal". Think of these users more as sub-accounts. Internal users are essentially sub-accounts by another name.


Creating an Internal user

You can create an internal user by hitting this API: https://dev.fuze.finance/reference/openloopcreateuser
The userType would be "Internal". You can pass any internal identifier as the orgUserId.

You can also have multiple internal users, and you can move funds between internal users as well. This enables flows where you want to manage different trading strategies, different balances for different busienss units etc. To move funds between internal users, you can use this API: https://dev.fuze.finance/reference/openloopcreateinternaltransfer

Funding the account

Once you have the orgUserId created. You basically have a sub-account in place. You can now fund the account in a few ways:

Trades

Now that you have funds in the account, you can place trades. Fuze supports three types of trades - Request for Quotes, Market Order and Limit Orders. All three order types are executed via one end-point: https://dev.fuze.finance/reference/openloopcreateorder

For quote orders, you'd first have to generate a quote, which is then passed in the above Create Order API. To generate a quote, you can use this end-point: https://dev.fuze.finance/reference/openloopcreatequote

Withdrawing Funds

Other useful APIs

  1. Fetch balances for a user(sub-account): https://dev.fuze.finance/reference/openloopgetuserbalance
  2. Fetch order history for a user(sub-account): https://dev.fuze.finance/reference/openlooplistorders
  3. Simulate webhooks on preprod: https://dev.fuze.finance/reference/openloopsimulate

Important Pointers

  1. While supported via API, third-party transfers are subject to jurisdictional limitations. In some jurisdictions, only first-party transfers are permitted. Please be sure to check with Fuze as to what you can do on your account.
  2. In Sandbox - you can ask a solutions engineer to fund your account by adding funds via the backend. In that way, you can test trades etc. without having to go through the testing of funds transfers - which are complicated to test beyond a point.
  3. You can take a hybrid approach to your implementation - where certain actions (like funding) are done via our dashboard. And others (like trades) are done via API.
  4. Trades, counterparty additions, wallet whitelisting etc. are async operations. There are APIs to fetch statuses for all of them, and there are webhook events for them as well: https://dev.fuze.finance/reference/webhooks-2

Did this page help you?