Step 7: Executing transactions

Once the transaction is signed with the user signing key, it should be sent to the corresponding execution endpoint.

During this step, several checks are performed on the OneBalance side as well as the co-signing. Resource locking will occur if the transaction is eligible for fast execution.

Here’s an example of sending the transaction for execution:

fetch('https://be.onebalance.io/api/quotes/execute-quote', {
    method: "post",
    body: JSON.stringify(quote),
    headers: {
      "Content-Type": "application/json",
      "x-api-key": '<YOUR ONEBALANCE API KEY HERE>',
    },
  })

In the example above - the quote that is passed into the body of the request - is the signed quote returned by the signQuote function from the example in previous section.

For more details, see the implementation for sending the transaction for execution here.

Last updated