As a single counterparty

As a single counterparty, you will need to create and manage contracts

Subscribe to events

If your system can receive events that occur surrounding any contracts you are a counter-party to, using your API key, you will want to use the Webhook/Subscription Management API. With this API, you can choose to be notified when various events occur, like any time your account is added as a counter-party to a contract, when a contract needs collateral or approvals, when a contract has terminated, etc.

Create a contract

Using your API key, call the Create Contract API within the Contract Management API. Currently, we only support creating Loan type contracts, but more are coming soon. When creating the Loan contract, specify your account ID as the borrower or the lender and your counter-party's account ID as the other. Your API key needs to match one of the counter-party's API key. The request includes all of the terms and conditions associated with the loan, including term, interest rate, loan amount, collateral amount, etc. After successful creation, the contract ID is returned.

If the you are also subscribed to the contract created event, a notification will be sent to the specified endpoint with the information regarding the creation of the contract.

Set the withdrawal address

Once the contract is created, you will want to use the Set Withdrawal Address API to set the Bitcoin wallet address for funds to be withdrawn to when the contract is fulfilled or closed out.

Terminate a contract

Before a contract has been approved by BOTH counter-parties, a contract can be terminated by either counter-party using the Terminate a Contract API. Once approved by BOTH counter-parties, the contract can no longer be terminated. If you are subscribed to the terminate a contract event, there will be a notification sent to the endpoint specified with the subscription.

Update a contract

Before a contract has been approved by EITHER counter-party, a contract can be updated by either counter-party using the Update a Contract API. Once a contract has been approved by one counter-party, it is locked for updates, but can be terminated.

Approve a contract

Once a contract is created and as a counter-party, your sub-account agrees to the terms and conditions, a request on their behalf can be sent to Approve the Contract. Once the contract is approved, ARC establishes a secure contract environment for the execution of the contract.

If subscribed to the counter-party approved event, a notification will be sent when the other counter-party has approved the contract, alerting this counter-party that they need to approve or terminate the contract.

If subscribed to the contract approved event, a notification will be sent when both parties have approved the contract.

If subscribed to the deposit address created event, when the secure contract environment is established and the contract is ready, an alert will notify the borrower to deposit collateral to the deposit address created with the contract. To find the deposit address, use the Get Deposit Address API.

The borrower will need to deposit the specified Fiat Loan Value equivalent BTC amount to the deposit address specified.

Deposit additional collateral if needed

If the price of BTC drops to a point where the borrower needs to provide additional collateral, an event will be sent to the endpoint specified on the endpoint associated with the subscription for the additional collateral required event. If needed, you can again call the Get Deposit Address API to get the wallet address to send additional BTC.

Last updated