Zarban API (2.0.0)

Download OpenAPI specification:Download

API for Zarban services.

Websocket

Websocket Upgrade

Upgrade to websocket connection

Responses

Permit

Get permit for single token

Get permit for single token

query Parameters
token
required
string0x[a-fA-F0-9]{40}

Ethereum address of the token

user
required
string0x[a-fA-F0-9]{40}

Ethereum address of the user

Responses

Response samples

Content type
application/json
{
  • "typedData": {
    },
  • "hash": "string"
}

Swap

Get a quote for a swap

Get a quote for a swap

Request Body schema: application/json
required
requestId
string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]...
type
string (OrderType)
Enum: "Classic" "DutchLimit"
tradeType
required
string (TradeType)
Enum: "ExactInput" "ExactOutput"
inputToken
required
string^(0x)?[0-9a-fA-F]{40}$
outputToken
required
string^(0x)?[0-9a-fA-F]{40}$
amount
required
string
recipient
required
string^(0x)?[0-9a-fA-F]{40}$
object (QuoteRequestOptions)

Responses

Request samples

Content type
application/json
{
  • "requestId": "string",
  • "type": "Classic",
  • "tradeType": "ExactInput",
  • "inputToken": "0x1234567890123456789012345678901234567890",
  • "outputToken": "0x1234567890123456789012345678901234567890",
  • "amount": "123.456789",
  • "recipient": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "type": "Classic",
  • "tradeType": "ExactInput",
  • "time": {
    },
  • "amount": {
    },
  • "quote": {
    },
  • "quoteId": "string",
  • "gasPrice": {
    },
  • "gasUseEstimate": 0,
  • "gasFeeEstimate": {
    },
  • "routeString": "A -- [0x0000000000000000000000000000000000000012] --> B -- [0x0000000000000000000000000000000000000023] --> C",
  • "methodParameters": {
    },
  • "route": [
    ],
  • "orderInfo": {
    },
  • "encodedOrder": "string",
  • "orderHash": "string",
  • "permitData": {
    }
}

Orders

Updates Order Entity

updates an order entity in database

Request Body schema: application/json
required
orderHash
required
string^(0x)?[0-9a-fA-F]{64}$

Responses

Request samples

Content type
application/json
{
  • "orderHash": "string"
}

Response samples

Content type
application/json
{
  • "msg": "Bad request",
  • "reasons": [
    ]
}

Fetch Unfilled Orders

Get a list of unfilled orders filtered by different parameters.

query Parameters
type
string
Enum: "limit" "dutch"

Type of the order

hash
string^0x[0-9,a-z,A-Z]{64}$

order hash

status
string
Enum: "open" "expired" "error" "cancelled" "filled" "insufficient-funds"

Status of the order

offerer
string0x[a-fA-F0-9]{40}

Ethereum address of the offerer

filler
string0x[a-fA-F0-9]{40}

Ethereum address of the filler

object (TimeRange)

Decay start time

object (TimeRange)

Decay end time

object (TimeRange)

Order deadline

cursor
integer

Cursor for pagination

limit
integer
Default: 10

Limit the number of orders returned (default is 10)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Addresses

Get all addresses

All addresses knows to Zarban.

query Parameters
format
string

The type of addresses to return

Responses

Response samples

Content type
application/json
[
  • {
    }
]

LendingPool

Deposit to lending pool

Deposit to lending pool

Request Body schema: application/json
required

Deposit transaction request, if amount is not provided, it will be calculated based on the token balance

user
required
string <address>

Ethereum address of the user

symbol
required
string
amount
string

The amount to deposit in native token units, if not provided, it will be calculated based on the token balance

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "symbol": "ETH",
  • "amount": "10000000000000000000"
}

Response samples

Content type
application/json
{
  • "chainActivity": {
    },
  • "response": {
    }
}

Withdraw from lending pool

Withdraw from lending pool

Request Body schema: application/json
required

Withdraw transaction request, if amount is not provided, it will be calculated based on the user account status

user
required
string <address>

Ethereum address of the user

symbol
required
string
amount
string

The amount to withdraw in native token units, if not provided, it will be calculated based on the deposit balance

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "symbol": "string",
  • "amount": "10000000000000000000"
}

Response samples

Content type
application/json
{
  • "chainActivity": {
    },
  • "response": {
    }
}

Borrow from lending pool

Borrow from lending pool

Request Body schema: application/json
required

Borrow transaction request, if amount is not provided, it will be calculated based on the token balance

user
required
string <address>

Ethereum address of the user

symbol
required
string
amount
string

The amount to borrow in native token units

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "symbol": "string",
  • "amount": "10000000000000000000"
}

Response samples

Content type
application/json
{
  • "chainActivity": {
    },
  • "response": {
    }
}

Repay to lending pool

Repay to lending pool

Request Body schema: application/json
required

Repay transaction request, if amount is not provided, it will repay the maximum possible amount

user
required
string <address>

Ethereum address of the user

symbol
required
string
amount
string

The amount to repay in native token units, if not provided, it will be calculated based on the borrow balance

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "symbol": "string",
  • "amount": "10000000000000000000"
}

Response samples

Content type
application/json
{
  • "chainActivity": {
    },
  • "response": {
    }
}

Enable/Disable asset as collateral

Allows to enable/disable a specific asset as collateral

Request Body schema: application/json
required

UseAssetAsCollateral transaction request

user
required
string <address>

Ethereum address of the user

symbol
required
string

Symbol of asset

enabled
required
boolean

Enable or disable the asset as collateral

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "symbol": "string",
  • "enabled": true
}

Response samples

Content type
application/json
{
  • "chainActivity": {
    },
  • "response": {
    }
}

Get lending pool overview

Get lending pool overview

Responses

Response samples

Content type
application/json
{
  • "totalMarketSize": {
    },
  • "totalAvailable": {
    },
  • "totalBorrows": {
    }
}

Fetch Reserve Data By Asset

Retrieve data of reserves

query Parameters
asset
string

The asset address in hexadecimal format.

Responses

Response samples

Content type
application/json
{
  • "id": "0x1234567890123456789012345678901234567890:0x1234567890123456789012345678901234567890",
  • "underlyingAsset": {
    },
  • "zTokenAddress": "0x1234567890123456789012345678901234567890",
  • "variableDebtTokenAddress": "0x1234567890123456789012345678901234567890",
  • "borrowingEnabled": true,
  • "isActive": true,
  • "isFrozen": false,
  • "usageAsCollateralEnabled": true,
  • "reserveFactor": "0.1",
  • "baseLTVasCollateral": "0.5",
  • "reserveLiquidationThreshold": "0.6",
  • "reserveLiquidationBonus": "0.1",
  • "utilizationRate": "0.5",
  • "totalDebt": {
    },
  • "totalLiquidity": {
    },
  • "availableLiquidity": {
    },
  • "supplyAPY": "0.1",
  • "supplyAPR": "0.1",
  • "variableBorrowAPY": "0.1",
  • "variableBorrowAPR": "0.1",
  • "price": {
    }
}

Get user deposits of Lendingpool

Get user deposits of Lendingpool

query Parameters
user
string0x[a-fA-F0-9]{40}

Ethereum address of the user

reserve
string0x[a-fA-F0-9]{40}

Ethereum address of the reserve

cursor
integer

Cursor for pagination

limit
integer
Default: 50

Limit the number of deposits returned (default is 50)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get user borrows of lendingpool

Get user borrows of lendingpool

query Parameters
user
string0x[a-fA-F0-9]{40}

Ethereum address of the user

reserve
string0x[a-fA-F0-9]{40}

Ethereum address of the reserve

cursor
integer

Cursor for pagination

limit
integer
Default: 50

Limit the number of deposits returned (default is 50)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

StableCoinSystem

Create vault

Create vault

Request Body schema: application/json
required

Create vault transaction request

ilkName
required
string

The name of the ilk

user
required
string <address>

Ethereum address of the user

collateralAmount
string

The amount of collateral to deposit in native token units

mintAmount
required
string

The amount of stablecoin to mint in native token units

Responses

Request samples

Content type
application/json
{
  • "ilkName": "ETH-A",
  • "user": "0x1234567890123456789012345678901234567890",
  • "collateralAmount": "10000000000000000000",
  • "mintAmount": "10000000000000000000"
}

Response samples

Content type
application/json
[
  • {
    }
]

Deposit collateral

Deposit collateral

Request Body schema: application/json
required

Deposit collateral transaction request

user
required
string <address>

Ethereum address of the user

vaultId
required
integer

The ID of the vault

amount
string

The amount of collateral to deposit in native token units, if not provided, it will be calculated based on the wallet balance

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "vaultId": 1,
  • "amount": "10000000000000000000"
}

Response samples

Content type
application/json
[
  • {
    }
]

Withdraw collateral

Withdraw collateral

Request Body schema: application/json
required

Withdraw collateral transaction request

user
required
string <address>

Ethereum address of the user

vaultId
required
integer

The ID of the vault

amount
string

The amount of collateral to withdraw in native token units, if not provided, it will be calculated based on the withdrawable balance

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "vaultId": 1,
  • "amount": "10000000000000000000"
}

Response samples

Content type
application/json
[
  • {
    }
]

Mint ZAR

Mint ZAR

Request Body schema: application/json
required

Mint ZAR transaction request

user
required
string <address>

Ethereum address of the user

vaultId
required
integer

The ID of the vault

amount
string

The amount of stablecoin to mint in native token units, if not provided, it will be calculated based on the available to mint amount

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "vaultId": 1,
  • "amount": "10000000000000000000"
}

Response samples

Content type
application/json
[
  • {
    }
]

Repay ZAR

Repay ZAR

Request Body schema: application/json
required

Repay ZAR transaction request

user
required
string <address>

Ethereum address of the user

vaultId
required
integer

The ID of the vault

amount
string

The amount of stablecoin to repay in native token units, if not provided, it will be calculated based on the borrow balance

Responses

Request samples

Content type
application/json
{
  • "user": "0x1234567890123456789012345678901234567890",
  • "vaultId": 1,
  • "amount": "10000000000000000000"
}

Response samples

Content type
application/json
[
  • {
    }
]

Get all Ilks

Retrieve a list of all available ilks.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Ilk by name

Retrieve an Ilk by providing its name.

path Parameters
name
required
string

Name of the ILK

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "symbol": "USD",
  • "minimumCollateralizationRatio": "string",
  • "maximumLoanToValue": "string",
  • "liquidationPenalty": "string",
  • "debtCeiling": {
    },
  • "debt": {
    },
  • "annualStabilityFee": "string",
  • "dustLimit": {
    },
  • "price": {
    },
  • "nextPrice": {
    },
  • "join": "string",
  • "median": "string",
  • "gem": "string",
  • "clipper": "string",
  • "pip": "string",
  • "hole": {
    },
  • "dirt": {
    },
  • "availableToBorrow": {
    }
}

Retrieves proxies owned by a specific owner

Returns a list of proxies filtered by the owner's address.

query Parameters
owner
required
string <string>

The Ethereum address of the owner.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get collector data

Get collector data

Responses

Response samples

Content type
application/json
{
  • "stablecoinSystem": {
    },
  • "lendingpool": {
    }
}

Get a vault by ID

path Parameters
id
required
integer

Vault ID

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "owner": "0x1234567890123456789012345678901234567890",
  • "urn": "0x1234567890123456789012345678901234567890",
  • "liquidationPrice": {
    },
  • "collateralLocked": {
    },
  • "collateralizationRatio": "1.5",
  • "loanToValue": "0.5",
  • "debt": {
    },
  • "availableToWithdraw": {
    },
  • "availableToMint": {
    },
  • "ilk": {
    }
}

Get vault events by ID

path Parameters
id
required
integer

Vault ID

query Parameters
type
string
Enum: "repay" "deposit" "withdraw" "mint"

Event type

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get vaults by owner query

query Parameters
owner
string

Ethereum address of the owner

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get authorization matrix

Responses

Response samples

Content type
application/json
{
  • "wheres": [
    ],
  • "whos": [
    ],
  • "values": [
    ]
}

Ilks

Get all Ilks

Retrieve a list of all available ilks.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Ilk by name

Retrieve an Ilk by providing its name.

path Parameters
name
required
string

Name of the ILK

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "symbol": "USD",
  • "minimumCollateralizationRatio": "string",
  • "maximumLoanToValue": "string",
  • "liquidationPenalty": "string",
  • "debtCeiling": {
    },
  • "debt": {
    },
  • "annualStabilityFee": "string",
  • "dustLimit": {
    },
  • "price": {
    },
  • "nextPrice": {
    },
  • "join": "string",
  • "median": "string",
  • "gem": "string",
  • "clipper": "string",
  • "pip": "string",
  • "hole": {
    },
  • "dirt": {
    },
  • "availableToBorrow": {
    }
}

Proxies

Retrieves proxies owned by a specific owner

Returns a list of proxies filtered by the owner's address.

query Parameters
owner
required
string <string>

The Ethereum address of the owner.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Collector

Get collector data

Get collector data

Responses

Response samples

Content type
application/json
{
  • "stablecoinSystem": {
    },
  • "lendingpool": {
    }
}

Deposits

Get user deposits of Lendingpool

Get user deposits of Lendingpool

query Parameters
user
string0x[a-fA-F0-9]{40}

Ethereum address of the user

reserve
string0x[a-fA-F0-9]{40}

Ethereum address of the reserve

cursor
integer

Cursor for pagination

limit
integer
Default: 50

Limit the number of deposits returned (default is 50)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Borrows

Get user borrows of lendingpool

Get user borrows of lendingpool

query Parameters
user
string0x[a-fA-F0-9]{40}

Ethereum address of the user

reserve
string0x[a-fA-F0-9]{40}

Ethereum address of the reserve

cursor
integer

Cursor for pagination

limit
integer
Default: 50

Limit the number of deposits returned (default is 50)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Logs

Get raw and decoded logs by transaction hash

Get raw and decoded logs by transaction hash

path Parameters
txHash
required
string0x[a-fA-F0-9]{64}

Transaction hash

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Prices

List prices based on query parameters

Retrieve a list of price details based on specified query parameters

query Parameters
symbol
string

Symbol of the price

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get price history for a symbol

Get price history for a symbol

path Parameters
symbol
required
string

Symbol of the price

query Parameters
from
string <date-time>

Start date

to
string <date-time>

End date

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Vaults

Get a vault by ID

path Parameters
id
required
integer

Vault ID

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "owner": "0x1234567890123456789012345678901234567890",
  • "urn": "0x1234567890123456789012345678901234567890",
  • "liquidationPrice": {
    },
  • "collateralLocked": {
    },
  • "collateralizationRatio": "1.5",
  • "loanToValue": "0.5",
  • "debt": {
    },
  • "availableToWithdraw": {
    },
  • "availableToMint": {
    },
  • "ilk": {
    }
}

Get vault events by ID

path Parameters
id
required
integer

Vault ID

query Parameters
type
string
Enum: "repay" "deposit" "withdraw" "mint"

Event type

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get vaults by owner query

query Parameters
owner
string

Ethereum address of the owner

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Permissions

Get authorization matrix

Responses

Response samples

Content type
application/json
{
  • "wheres": [
    ],
  • "whos": [
    ],
  • "values": [
    ]
}

Accounts

Get account by address

Get account by address

path Parameters
address
required
string <address>
Example: 0x1234567890123456789012345678901234567890

Ethereum address of the account

Responses

Response samples

Content type
application/json
{
  • "points": 100,
  • "address": "0x1234567890123456789012345678901234567890",
  • "walletBalance": {
    },
  • "netWorth": {
    },
  • "totalDebt": {
    },
  • "totalDeposits": {
    },
  • "lendingpoolSummary": {
    },
  • "stabelcoinSystemSummary": {
    }
}