Introduction
Welcome to the Vauld Enterprise API's!

You can use our API to access our secure endpoints, which can help you create wallets for your users or create lending and borrowing orders without having to create a user/wallet. Welcome to the Vauld Enterprise API documentation! You can use our API to access secure endpoints, which can help you create wallets for your users and get access to our lending and borrowing functionalities. We have language bindings in JavaScript. You can view relevant code samples over to the right in the dedicated dark section as shown. You can switch the programming language of the examples shown with tabs displayed on the top-left corner of the region.
Getting Started
Base URL for testnet
https://apis.bankofhodlers.com


To get access to production URL's and API keys, contact us at partner@vauld.com. The testnet we use for ETH and ERC20 is kovan network.
For you to get started using testnet, test API key and organisationID are provided in each offered API type page's introduction.
For more reading on mainnets and testnets: Ethereum 101: Mainnet and testnets
Testnet and Mainnet addresses are different for some Blockchain Protocols, The appropriate documentation should reflect this when applicable.
Alright, if that's all good, let's get started!
Authentication
We use HMAC based authentication, for further reading on the protocol: HMAC documentation

To authenticate the APIs, we create an HMAC hash for the payload (in URI format) using the SHA-256 hashing algorithm using the provided APIKey as the seed. The HMAC hash generated is converted to it's Hex notation and is passed to the response body in the format mentioned below, with the headers set to

Content-Type: application/json.
hmac: _HMAC_Hash_asHex_
Replace   _HMAC_Hash_asHex_   with the hash as described above.
Replace   _Request_inJSON_   with the json payload (request body) required for the API endpoint.
Replace   _your_APIKey_ with the APIkey provided for your Organisation.
To authenticate, use this format:

# You can use any hmac library that supports SHA256 algorithm
# Illustrative code generate hmac for a payload

const CryptoJS = require('CryptoJS');

const jsonToURI = async (jsonObj) => {
var output = '';
var keys = Object.keys(jsonObj);
keys.forEach(function(key) {
output = output + key + '=' + jsonObj[key] + '&';
});
return output.slice(0, -1);
}

const payload = '_Request_inJSON_';
const secret = '_your_APIKey_' // make this your secret!!

let URIencodedPayload = jsonToURI(JSON.parse(payload));
let hmac = CryptoJS.HmacSHA256(URIencodedPayload, secret);
et hash = hmac.toString(CryptoJS.enc.Hex);
Introduction
This module consists of documentation to create wallets using Vauld API's. This lets you create a wallet and receive or withdraw funds anytime.
Use this API key :
cnNmNUn8lZX/pfyKarFOTiDhC1BTOuc7dhr4a1Jrq7YkU3LeCro/v0qCbHoTjJrDW/vwETDeHCpyge1QkFZ8Sw== instead of _your_APIKey_ on the platform for accessing borrowing APIs
Use this orgID :
5def6d1b5e29efdb099933fb instead of _your_orgID_ with the above API key for accessing borrowing APIs
Users Module
Create New User
This endpoint creates a new user account for your organisation. This also creates a cryptocurrency wallet for each currecy on our platform for the user.
HTTP Request
POST {{url}}/api/v1/users/create
Query Parameters
Parameter Required Description
orgID yes Your OrganisationID
name yes Name of the user
email yes Email of the user
Response Details
Key Description
success true or false, depending on the processing of the request
data Contains details of the request
message Descriptive response
userDetails Details of the new user created
userID Unique identifier of the user, all interaction with our platform for the user will be via this ID
walletsCreated Boolean, true if wallets for the user were created for the user, false otherwise
BTCAddress Receiving Address for the user on the Bitcoin network
ETHAddress Receiving Address for the user on the Ethereum network
DAIAddress Receiving Address for the user on the DAI network
TUSDAddress Receiving Address for the user on the TrueUSD network
Returns success and data as keys in the case of a successful request. Response format : `{success: true,data: _RETURN_DATA_}`
Returns success and data as keys in the case of a successful request. Response format : `{success: false, error:{message: _ERROR_MESSAGE_}`
Get User Details
This endpoint retrieves details of a specific registered user.
HTTP Request
POST {{url}}/api/v1/users/profile
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
username yes Email address of the registered user.
Wallets Module
User Wallet Details
This endpoint retrieves wallet details of a specific registered user.
HTTP Request
POST {{url}}/api/v1/wallets/userBalanceDetails
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
userID yes Unique identifier of the user, received while creating a new user
Response Details
Key Description
success true or false, depending on the processing of the request
data Contains details of coin specific details
btc Bitcoin token specific details
eth Ethereum token specific details
tusd TrueUSD token specific details
dai DAI token specific details
balance Total Balance of the User
address Blockchain address assigned to the user
JSON response object format:
                          
{
    "success": true,
    "data": {
        "btc": {
            "balance": 0,
            "address": "2N7RzJHbhQXDsLAUh2xCEhnSkAoVA1K6R8g"
        },
        "eth": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "tusd": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "dai": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        }
    }
}
Transfer
This endpoint transfers tokens from one wallet to another
HTTP Request
POST {{url}}/api/v1/wallets/transfer
URL Parameters
Parameter Required Description
token yes token ticker
wallerAddr yes sender's wallet address
orgID yes Your OrganisationID
amount yes Amount to be sent
receiver yes Receiver wallet address
userID yes Unique identifier of the user, received while creating a new user
Response Details
Key Description
success true or false
data Contains coin specific details
btc Bitcoin token specific details
eth Ethereum token specific details
tusd TrueUSD token specific details
dai DAI token specific details
balance Total Balance of the User
address Blockchain address assigned to the user
JSON response object format:
                          
{
    "success": true,
    "data": {
        "btc": {
            "balance": 0,
            "address": "2N7RzJHbhQXDsLAUh2xCEhnSkAoVA1K6R8g"
        },
        "eth": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "tusd": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "dai": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        }
    }
}
Transaction Cost
This endpoint gets the cost of a transaction, if it were to be broadcast at that moment. This is amount agnostic!
HTTP Request
POST {{url}}/api/v1/wallets/getTxnFees
URL Parameters
Parameter Required Description
token yes token ticker
orgID yes Your OrganisationID
amount yes Amount to be sent
receiver yes Receiver wallet address
Response Details
Key Description
success true or false
data Contains coin specific details
fee the fee to be charged for the transaction
coin The cryptocurrency for which the transaction details have been returned
JSON response object format:
                          
{
    "success": true,
    "fee": "sample fee",
    "coin": "btc"
}
Introduction
This module consists of documentation to create wallets using Vauld API's. This lets you create a wallet, earn interest and receive or withdraw funds anytime.
Use this API key :
NQvIx0Xse1P6DtTW799ebLwQJvaOHdeyOY2Dlwh7gRU/0CnSoOgw0ZyEslc2m+z8JtQ4b466B9RfJ7HnfLm/MA== instead of _your_APIKey_ on the platform for accessing lending APIs
Use this orgID :
5def6f78720b5ea70426e41f instead of _your_orgID_ with the above API key for accessing lending APIs
Users Module
Create New User
This endpoint creates a new user account for your organisation. This also creates a cryptocurrency wallet for each currecy on our platform for the user.
HTTP Request
POST {{url}}/api/v1/users/create
Query Parameters
Parameter Required Description
orgID yes Your OrganisationID
name yes Name of the user
email yes Email of the user
Response Details
Key Description
success true or false, depending on the processing of the request
data Contains details of the request
message Descriptive response
userDetails Details of the new user created
userID Unique identifier of the user, all interaction with our platform for the user will be via this ID
walletsCreated Boolean, true if wallets for the user were created for the user, false otherwise
BTCAddress Receiving Address for the user on the Bitcoin network
ETHAddress Receiving Address for the user on the Ethereum network
DAIAddress Receiving Address for the user on the DAI network
TUSDAddress Receiving Address for the user on the TrueUSD network
Returns success and data as keys in the case of a successful request. Response format : `{success: true,data: _RETURN_DATA_}`
Returns success and data as keys in the case of a successful request. Response format : `{success: false, error:{message: _ERROR_MESSAGE_}`
Get User Details
This endpoint retrieves details of a specific registered user.
HTTP Request
POST {{url}}/api/v1/users/profile
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
username yes Email address of the registered user.
Wallets Module
User Wallet Details
This endpoint retrieves wallet details of a specific registered user.
HTTP Request
POST {{url}}/api/v1/wallets/userBalanceDetails
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
userID yes Unique identifier of the user, received while creating a new user
Response Details
Key Description
success true or false, depending on the processing of the request
data Contains details of coin specific details
btc Bitcoin token specific details
eth Ethereum token specific details
tusd TrueUSD token specific details
dai DAI token specific details
balance Total Balance of the User
address Blockchain address assigned to the user
JSON response object format:
                          
{
    "success": true,
    "data": {
        "btc": {
            "interest_earned": 0,
            "balance": 0,
            "address": "2N7RzJHbhQXDsLAUh2xCEhnSkAoVA1K6R8g"
        },
        "eth": {
            "interest_earned": 0,
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "tusd": {
            "interest_earned": 0,
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "dai": {
            "interest_earned": 0,
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        }
    }
}
Transfer
This endpoint transfers tokens from one wallet to another
HTTP Request
POST {{url}}/api/v1/wallets/transfer
URL Parameters
Parameter Required Description
token yes token ticker
wallerAddr yes sender's wallet address
orgID yes Your OrganisationID
amount yes Amount to be sent
receiver yes Receiver wallet address
userID yes Unique identifier of the user, received while creating a new user
Response Details
Key Description
success true or false
data Contains coin specific details
btc Bitcoin token specific details
eth Ethereum token specific details
tusd TrueUSD token specific details
dai DAI token specific details
balance Total Balance of the User
address Blockchain address assigned to the user
JSON response object format:
                          
{
    "success": true,
    "data": {
        "btc": {
            "interest_earned": 0,
            "balance": 0,
            "address": "2N7RzJHbhQXDsLAUh2xCEhnSkAoVA1K6R8g"
        },
        "eth": {
            "interest_earned": 0,
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "tusd": {
            "interest_earned": 0,
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "dai": {
            "interest_earned": 0,
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        }
    }
}
Transaction Cost
This endpoint gets the cost of a transaction, if it were to be broadcast at that moment. This is amount agnostic!
HTTP Request
POST {{url}}/api/v1/wallets/getTxnFees
URL Parameters
Parameter Required Description
token yes token ticker
orgID yes Your OrganisationID
amount yes Amount to be sent
receiver yes Receiver wallet address
Response Details
Key Description
success true or false
data Contains coin specific details
fee the fee to be charged for the transaction
coin The cryptocurrency for which the transaction details have been returned
JSON response object format:
                          
{
    "success": true,
    "fee": "sample fee",
    "coin": "btc"
}
Introduction
This module consists of documentation to create wallets using Vauld API's. This lets you create a wallet, receive or withdraw funds or take loan against the tokens.
Use this API key :
XDG70auRTt0V6nKn1DhWafHRRtJRH2x8J3QKWGyp3Cn4BBhsMyPNcQK+y4Qzg9bcI+KNJm1uvylLWAMBbkdc7w== instead of _your_APIKey_ on the platform for accessing borrowing APIs
Use this orgID :
5def7064720b5ea70426e42d instead of _your_orgID_ with the above API key for accessing borrowing APIs
Users Module
Create New User
This endpoint creates a new user account for your organisation. This also creates a cryptocurrency wallet for each currecy on our platform for the user.
HTTP Request
POST {{url}}/api/v1/users/create
Query Parameters
Parameter Required Description
orgID yes Your OrganisationID
name yes Name of the user
email yes Email of the user
Response Details
Key Description
success true or false, depending on the processing of the request
data Contains details of the request
message Descriptive response
userDetails Details of the new user created
userID Unique identifier of the user, all interaction with our platform for the user will be via this ID
walletsCreated Boolean, true if wallets for the user were created for the user, false otherwise
BTCAddress Receiving Address for the user on the Bitcoin network
ETHAddress Receiving Address for the user on the Ethereum network
DAIAddress Receiving Address for the user on the DAI network
TUSDAddress Receiving Address for the user on the TrueUSD network
Returns success and data as keys in the case of a successful request. Response format : `{success: true,data: _RETURN_DATA_}`
Returns success and data as keys in the case of a successful request. Response format : `{success: false, error:{message: _ERROR_MESSAGE_}`
Get User Details
This endpoint retrieves details of a specific registered user.
HTTP Request
POST {{url}}/api/v1/users/profile
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
username yes Email address of the registered user.
Wallets Module
User Wallet Details
This endpoint retrieves wallet details of a specific registered user.
HTTP Request
POST {{url}}/api/v1/wallets/userBalanceDetails
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
userID yes Unique identifier of the user, received while creating a new user
Response Details
Key Description
success true or false, depending on the processing of the request
data Contains details of coin specific details
btc Bitcoin token specific details
eth Ethereum token specific details
tusd TrueUSD token specific details
dai DAI token specific details
balance Total Balance of the User
address Blockchain address assigned to the user
JSON response object format:
                          
{
    "success": true,
    "data": {
        "btc": {
            "balance": 0,
            "address": "2N7RzJHbhQXDsLAUh2xCEhnSkAoVA1K6R8g"
        },
        "eth": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "tusd": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "dai": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        }
    }
}
Transfer
This endpoint transfers tokens from one wallet to another
HTTP Request
POST {{url}}/api/v1/wallets/transfer
URL Parameters
Parameter Required Description
token yes token ticker
wallerAddr yes sender's wallet address
orgID yes Your OrganisationID
amount yes Amount to be sent
receiver yes Receiver wallet address
userID yes Unique identifier of the user, received while creating a new user
Response Details
Key Description
success true or false
data Contains coin specific details
btc Bitcoin token specific details
eth Ethereum token specific details
tusd TrueUSD token specific details
dai DAI token specific details
balance Total Balance of the User
address Blockchain address assigned to the user
JSON response object format:
                          
{
    "success": true,
    "data": {
        "btc": {
            "balance": 0,
            "address": "2N7RzJHbhQXDsLAUh2xCEhnSkAoVA1K6R8g"
        },
        "eth": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "tusd": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        },
        "dai": {
            "balance": 0,
            "address": "0x055600D252835fCb4d4561ac2DD7Ab68442925C4"
        }
    }
}
Transaction Cost
This endpoint gets the cost of a transaction, if it were to be broadcast at that moment. This is amount agnostic!
HTTP Request
POST {{url}}/api/v1/wallets/getTxnFees
URL Parameters
Parameter Required Description
token yes token ticker
orgID yes Your OrganisationID
amount yes Amount to be sent
receiver yes Receiver wallet address
Response Details
Key Description
success true or false
data Contains coin specific details
fee the fee to be charged for the transaction
coin The cryptocurrency for which the transaction details have been returned
JSON response object format:
                          
{
    "success": true,
    "fee": "sample fee",
    "coin": "btc"
}
Borrow Module
Get Loan Rates
This endpoint gives out loan rates for specified token, if token parameter is not passed, all supported tokens loan rates will be returned.
HTTP Request
POST {{url}}/api/v1/borrow/getBorrowingRates
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
token yes token ticker
Response Details
Key Description
success true or false
data Contains coin specific details
[token] name of token
loan_interest Interest per annum for the specified token
JSON response object format:
                          
{
    "success": true,
    "data": {
        "tusd": {
            "loan_interest": 10
        },
        "btc": {
            "loan_interest": 8
            },
        "dai": {
            "loan_interest": 10
            },
        "eth": {
            "loan_interest": 8
            },
      }
}
Take Loan
Successful call to this endpoint will create a loan for the specified user. Collateral token wallet balance will be deducted by forAmount and loaned out token balance will increase by toAmount.
HTTP Request
POST {{url}}/api/v1/borrow/takeLoan
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
userID yes UserID of user, for whom loan will be processed
forToken yes Collateral token
toToken yes Loaned out token
forAmount yes Value of collateral token to be collaterized
toAmount yes Value of loaned out token to be disbursed
Response Details
Key Description
success true or false
data contains message if loan was disbursed
JSON response object format:
                          
{
    "success": true,
    "data": {
        "message": "successfully created loan"
    }
}
Introduction
If you have an already existing wallet, you can use the given API's to enable borrowing for your users.
Organization can request to create an order, add or withdraw collateral and withdraw or payback the loan anytime they like using this partner API
Use this API key :
cnNmNUn8lZX/pfyKarFOTiDhC1BTOuc7dhr4a1Jrq7YkU3LeCro/v0qCbHoTjJrDW/vwETDeHCpyge1QkFZ8Sw== instead of _your_APIKey_ on the platform for accessing borrowing APIs
Use this orgID :
5def6d1b5e29efdb099933fb instead of _your_orgID_ with the above API key for accessing borrowing APIs
Borrowing Module
Create Order
This endpoint creates a borrowing order for the collateral token.
HTTP Request
POST {{url}}/api/v1/borrowing/createNewOrder
Query Parameters
Parameter Required Description
orgID yes Your OrganisationID
collateralToken yes Collateral token
loanToken yes Token in which you want to receive the loan
Response Details
Key Description
success true or false
data Contains order specific details
collateralDepositAddress Address at which collateral token needs to be sent to activate the order
loanRepaymentAddress Address at which loaned out token needs to be repaid partly or fully
interestRate Annual rate of interest for the loan
orderID orderID for the borrow order, which can be used for fetching details of the order
JSON response object format:
                          
{
	"success": true,
	"data": {
    	"collateralDepositAddress": "0xce6A74eFaE4a9047Ae63ddb3e94f23e4652606b2",
      "loanRepaymentAddress": "0xce6A74eFaE4a9047Ae63ddb3e94f23e4652606b2",
      “interestRate” : 8,
    	"orderID": "5df4a0e31b9f330741a58784"
	 }
}
Get Borrowing Rates
This endpoint gives out borrowing rates for specified token, if the token parameter is not passed , all supported tokens borrow rates will be returned.
HTTP Request
POST {{url}}/api/v1/borrowing/getRates
URL Parameters
Parameter Required Description
orgID yes Your Organisation ID
token yes Coin for which borrow rates needs to be fetched
Response Details
Key Description
success true or false
data Contains coin specific details
[token] Token name
interestRates Current borrowing interest rate for the fetched token
JSON response object format:
                          
{
    "success": true,
    "data": {
        "tusd": {
            "interestRate": 10
        },
        "btc": {
            "interestRate": 8
        },
        "dai": {
            "interestRate": 10
        },
        "eth": {
            "interestRate": 8
        }
    }
}
Get order details
This endpoint gives out order details for the created borrowing order.
HTTP Request
POST {{url}}/api/v1/borrowing/getOrderDetails
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
orderID yes orderID of one of the order created by your organisation
Response Details
Key Description
success true or false
data Contains order specific details
[token] Token name
orderID Order ID of the order
collateralToken Current collateral amount, in token base value
loanToken Loan token
loanAmount Current loan amount that has been loaned out in lieu of collateral token, in token base value
status It can be active, liquidated and paid depending on current state of the loan
collateralRatio Percentage of Total collateral token value by Total loan value. Less than 150% is unsafe, Below 200% is moderately safe, Above 200% is safe, Automated liquidation at 110%.
interestRate Interest rate of loan
withdrawableCollateral Collateral that can be withdrawn while maintaining minimum recommended collateral ratio of 150%
withdrawableLoan Loan that can be withdrawn while maintaining minimum recommended collateral ratio of 150%
interest Pending interest on the loan, in loaned out token
txns All transactions on the passed order ID including deposits, repayments and withdrawals.
JSON response object format:
                          
{
Success:true,
data: {
  	“orderID”: “5df4a0e31b9f330741a58784”,
  	“collateralToken”: “eth”,
  	"collateralAmount": 10000000000000,
  	"loanToken": "tusd",
  	"loanAmount": 20000000,
  	"status": "active",
  	"collateralRatio": 230,
  	"interestRate": 8,
  	"interest": 23879,
            “withdrawableCollateral” : 1231749,
            “withdrawableLoan”: 1649164
  	"txns": {
        	deposits: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	},
           	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],
     	withdrawals: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	},
           	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],
     	repayments: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],

    	}
   }
Get all Orders
This endpoint gives a brief overview of all the borrowing orders associated with the organisation.
HTTP Request
POST {{url}}/api/v1/borrowing/getAllOrders
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
Response Details
Key Description
success true or false
data Contains order specific details
orderID orderID for the borrow order, which can be used for fetching details of the order
collateralRatio Percentage of Total collateral token value by Total loan value. Less than 150% is unsafe, Below 200% is moderately safe, Above 200% is safe, Automated liquidation at 110%.
JSON response object format:
                          
{
	"success": true,
	"data": [
                 {
                        “orderID” : “5df4a0e31b9f330741a58784”,
                        “collateralRatio”: 130,
                   },
                {
                        “orderID” : “5df4a0e31b9f330741a58784”,
                        “collateralRatio”: 230,
                 },
                 {
                        “orderID” : “5df4a0e31b9f330741a58784”,
                        “collateralRatio”: 111,
                 },
                  {
                        “orderID” : “5df4a0e31b9f330741a58784”,
                       “collateralRatio”: 190,
                 }
           ]
}
Withdraw Collateral
This endpoint enables you to withdraw extra collateral added while maintaining a minimum of 150% collateralization ratio.
HTTP Request
POST {{url}}/api/v1/borrowing/withdrawCollateral
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
orderID yes OrderID of the order one wishes to withdraw from
withdrawalAddress yes Address where the withdrawn amount needs to be sent
amount yes Amount of token in base value of token associated with the order
Response Details
Key Description
success true or false
data Contains order specific details
token Coin associated with the order
orderID order ID of the order
withdrawalTxnHash Transaction hash for the withdrawal transaction
collateralToken Collateral token
collateralAmount Current collateral amount, in token base value
loanToken Loan token
loanAmount Current loan amount that has been loaned out in lieu of collateral token, in token base value
status It can be active, liquidated and paid depending on current state of the loan
collateralRatio Percentage of Total collateral token value by Total loan value. Less than 150% is unsafe, Below 200% is moderately safe, Above 200% is safe, Automated liquidation at 110%.
interestRate Interest rate of loan
withdrawableCollateral Collateral that can be withdrawn while maintaining minimum recommended collateral ratio of 150%
withdrawableLoan Loan that can be withdrawn while maintaining minimum recommended collateral ratio of 150%
interest Pending interest on the loan, in loaned out token
txns All transactions on the passed order ID including deposits, repayments and withdrawals.
JSON response object format:
                          
{
Success:true,
data: {
  	“orderID”: “5df4a0e31b9f330741a58784”,
            “withdrawalTxnHash” : “0x7c066g62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”,
  	“collateralToken”: “eth”,
  	"collateralAmount": 10000000000000,
  	"loanToken": "tusd",
  	"loanAmount": 20000000,
  	"status": "active",
  	"collateralRatio": 230,
  	"interestRate": 8,
  	"interest": 23879,
            “withdrawableCollateral” : 1231749,
            “withdrawableLoan”: 1649164
  	"txns": {
        	deposits: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	},
           	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],
     	withdrawals: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	},
           	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],
     	repayments: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],

    	}
   }
Withdraw Loan
This endpoint enables you to withdraw loan while maintaining a minimum of 150% collateralization ratio.
HTTP Request
POST {{url}}/api/v1/borrowing/withdrawLoan
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
orderID yes OrderID of the order one wishes to withdraw from
withdrawalAddress yes Address where the withdrawn amount needs to be sent
amount yes Amount of token in base value of token associated with the order
Response Details
Key Description
success true or false
data Contains order specific details
[token] Token name
orderID order ID of the order
withdrawalTxnHash Transaction hash for the withdrawal transaction
collateralToken Collateral token
collateralAmount Current collateral amount, in token base value
loanToken Loan token
loanAmount Current loan amount that has been loaned out in lieu of collateral token, in token base value
status It can be active, liquidated and paid depending on current state of the loan
collateralRatio Percentage of Total collateral token value by Total loan value. Less than 150% is unsafe, Below 200% is moderately safe, Above 200% is safe, Automated liquidation at 110%.
interestRate Interest rate of loan
withdrawableCollateral Collateral that can be withdrawn while maintaining minimum recommended collateral ratio of 150%
withdrawableLoan Loan that can be withdrawn while maintaining minimum recommended collateral ratio of 150%
interest Pending interest on the loan, in loaned out token
txns All transactions on the passed order ID including deposits, repayments and withdrawals.
JSON response object format:
                          
{
Success:true,
data: {
  	“orderID”: “5df4a0e31b9f330741a58784”,
            “withdrawalTxnHash” : “0x7c066g62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”,
  	“collateralToken”: “eth”,
  	"collateralAmount": 10000000000000,
  	"loanToken": "tusd",
  	"loanAmount": 20000000,
  	"status": "active",
  	"collateralRatio": 230,
  	"interestRate": 8,
  	"interest": 23879,
            “withdrawableCollateral” : 1231749,
            “withdrawableLoan”: 1649164
  	"txns": {
        	deposits: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	},
           	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],
     	withdrawals: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	},
           	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],
     	repayments: [
            	{
                  	date: “2019-12-14T12:45:32.299Z”,
                  	amount: “1000000000000000000”,
                  	txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
            	}
      	],

    	}
}
Close Position
This endpoint liquidated enough collateral to pay back the loan and releases the remaining collateral.
HTTP Request
POST {{url}}/api/v1/borrowing/close
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
receiverAddress yes Address to which remaining collateral should be sent.
orderID yes orderID of one of the order created by your organisation
Response Details
Key Description
success true or false
data Contains order specific details
txnHash Transaction hash of the transaction which released remaining collateral to receiverAddress
JSON response object format:
                          
{
	"success": true,
	"data": {
    	"txnHash": "0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3",
    		}
}
Register Webhook
This endpoint creates registers a URL for a webhook that intimates about change in collateralization ratio.
HTTP Request
POST {{url}}/api/v1/borrowing/registerWebhook
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
orderID yes orderID of one of the order created by your organisation
url yes URL where change in collateralization ratio should be informed
Response Details
Key Description
success true or false
JSON response object format:
                          
{
	"success": true,
}
Webhook Response
If collateral ratio below 150% and above 125%, webhook is triggered once every 2 days, if it stays the same way,
If collateral ratio drops below 125%, webhook is triggered once a day
If collateral ratio at or below 115%, webhook is triggered every 6hours
if at 110% , webhook is triggered to notify liquidation
HTTP Request
POST
Add more collateral and pay back loan
For adding more collateral or paying back loan, send the funds to collateralDepositAddress or loanRepaymentAddress respectively. After confirmation from the blockchain, order and collateralization ratio will be automatically updated
Introduction
If you have an already existing wallet, you can use the given API's to enable earn interest for your user funds.
An organization can create a lending order anytime, move funds to the wallet and withdraw the funds anytime they like.
Interest is calculated daily and paid out every week.
Use this API key :
4iW9ND4DTuIXQHhviI1UeR73B7j2LWSF/7OpNfv6QkUNgWtBLi/TT6SBsnkfu1jjhWmvReUuK66IMO3IZvRNhA== instead of _your_APIKey_ on the platform for accessing lending APIs
Use this orgID :
5dfa3971149c835840881a4b instead of _your_orgID_ with the above API key for accessing lending APIs
Lending Module
Create Order
This endpoint creates a lending order for the input token.
HTTP Request
POST {{url}}/api/v1/lending/createNewOrder
Query Parameters
Parameter Required Description
orgID yes Your OrganisationID
token yes Coin for which lend order needs to be created
Response Details
Key Description
success true or false
data Contains order specific details
receiverAddress Address at which token amount needs to be sent to activate the order and start earning interest
orderID orderID for the lend order, which can be used for fetching details of the order
JSON response object format:
                          
{
	"success": true,
	"data": {
    	"receiverAddress": "0xce6A74eFaE4a9047Ae63ddb3e94f23e4652606b2",
    	"orderID": "5df4a0e31b9f330741a58784"
	}
}
Get Lending Rates
This endpoint gives out lending rates for specified token, if token parameter is not passed , all supported tokens loan rates will be returned.
HTTP Request
POST {{url}}/api/v1/lending/getRates
URL Parameters
Parameter Required Description
orgID yes Your Organisation ID
token yes Coin for which lend rates needs to be fetched
Response Details
Key Description
success true or false
data Contains coin specific details
[token] Token name
interestRates Current lending interest rate for the fetched token
JSON response object format:
                          
{
    "success": true,
    "data": {
        "tusd": {
            "interestRate": 10
        },
        "btc": {
            "interestRate": 8
        },
        "dai": {
            "interestRate": 10
        },
        "eth": {
            "interestRate": 8
        }
    }
}
Get order details
This endpoint gives out order details for the created lending order.
HTTP Request
POST {{url}}/api/v1/lending/getOrderDetails
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
orderID yes orderID of one of the order created by your organisation
Response Details
Key Description
success true or false
data Contains order specific details
[token] Token name
currentPrinciple Current principle for this order in token base value
interestEarned Total interest earned for this order in token base value
interestPaidOut Total interest paid out for this order
isOrderActive True or false, depending upon whether deposit was made to the receiver address
txns This contains all the transactions associated with this order that includes deposits, withdrawals and interest payments till date.
JSON response object format:
                          
{
    "success": true,
    "data": {
        "token” : “eth”,
         “currentPrinciple” : “1000000000000000000”,
          “interestEarned” : “7000000000000000”,
          “interestPaidOut” : “1000000000000000”,
          “isOrderActive” : true,
       txns: {
            deposits: [
                {
                      date: “2019-12-14T12:45:32.299Z”,
                      amount: “1000000000000000000”,
                      txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
                },
               {
                      date: “2019-12-14T12:45:32.299Z”,
                      amount: “1000000000000000000”,
                      txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
                }
          ],
         withdrawals: [
                {
                      date: “2019-12-14T12:45:32.299Z”,
                      amount: “1000000000000000000”,
                      txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
                },
               {
                      date: “2019-12-14T12:45:32.299Z”,
                      amount: “1000000000000000000”,
                      txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
                }
          ],
         interestPaidOut: [
                {
                      date: “2019-12-14T12:45:32.299Z”,
                      amount: “1000000000000000000”,
                }
          ],
    }
}
Get all Orders
This endpoint gives a brief overview of all the orders associated with the organisation.
HTTP Request
POST {{url}}/api/v1/lending/getAllOrders
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
Response Details
Key Description
success true or false
data Contains order specific details
orderID orderID for the lend order, which can be used for fetching details of the order
token Coin associated with the order
currentPrinciple Current principle for the associated orderID
JSON response object format:
                          
{
	"success": true,
	"data": [
          {
              “orderID” : “5df4a0e31b9f330741a58784”,
              “token” : “eth”,
              “currentPrinciple” : “10000000000000”
          },
          {
              “orderID” : “5df4a0e31b9f330741a58784”,
              “token” : “dai”,
              “currentPrinciple” : “1000025250000000”
          },
          {
              “orderID” : “5df4a0e31b9f330741a58784”,
              “token” : “tusd”,
              “currentPrinciple” : “12346000000”
          },
          {
              “orderID” : “5df4a0e31b9f330741a58784”,
              “token” : “btc”,
              “currentPrinciple” : “1200000”
           }
     ]
}
Withdrawal
This endpoint enables you to withdraw any amount upto a maximum of current principle associated with the order.
HTTP Request
POST {{url}}/api/v1/lending/withdraw
URL Parameters
Parameter Required Description
orgID yes Your OrganisationID
orderID yes OrderID of the order one wishes to withdraw from
withdrawalAddress yes Address where the withdrawn amount needs to be sent
amount yes Amount of token in base value of token associated with the order
Response Details
Key Description
success true or false
data Contains order specific details
orderID orderID for the lend order, which can be used for fetching details of the order
token Coin associated with the order
currentPrinciple Current principle for the associated orderID
JSON response object format:
                          
{
	"success": true,
	"data": {
    “txnHash: “0x7c066b62cba0e2527748c175c7570afa36afeb38653288b00db632ce60e9cda3”
    }
}
Introduction - APIs for INR FIAT Rails
These set of APIs are for enterprises looking to integrate FIAT rails in India. They provide the ability to create an INR wallet for users, deposit INR to the wallet, and buy and sell cryptocurrencies with the deposited INR amount. They allow users to deposit INR via Cards/UPI/NEFT/IMPS/RTGS, and to withdraw INR to any bank account in 1 business day.

This document outlines the details of the APIs used to:

1. Create a user account
2. Complete KYC for a user
3. Deposit and withdraw INR
4. Buy and sell crypto with INR
5. Withdraw Crypto

NOTE: Prerequisites for using the APIs

1. Contact hello@vauld.com for your API_KEY and orgID
2. Creating a user account is a mandatory prerequisite for all the other APIs
3. Completing their KYC is a mandatory prerequisite for INR deposits/withdrawals and INR Buy/Sell

Base URL: https://api-dev.bankofhodlers.com/enterprise/api/v1/
Authentication
We use HMAC based authentication.

To authenticate the APIs, we create an HMAC hash for the payload (in URI format) using the SHA-256 hashing algorithm using the provided APIKey as the seed. The HMAC hash generated is converted to it's Hex notation and is passed to the response body in the format mentioned below, with the headers set to

Content-Type: application/json.
hmac: _HMAC_Hash_asHex_
Replace   _HMAC_Hash_asHex_   with the hash as described above.
Replace   _Request_inJSON_   with the json payload (request body) required for the API endpoint.
Replace   _your_APIKey_ with the APIkey provided for your Organisation.
To authenticate, use this format:

# You can use any hmac library that supports SHA256 algorithm
# Illustrative code generate hmac for a payload

const CryptoJS = require('CryptoJS');

const jsonToURI = async (jsonObj) => {
var output = '';
var keys = Object.keys(jsonObj);
keys.forEach(function(key) {
output = output + key + '=' + jsonObj[key] + '&';
});
return output.slice(0, -1);
}

const payload = '_Request_inJSON_';
const secret = '_your_APIKey_' // make this your secret!!

let URIencodedPayload = jsonToURI(JSON.parse(payload));
let hmac = CryptoJS.HmacSHA256(URIencodedPayload, secret);
et hash = hmac.toString(CryptoJS.enc.Hex);

pm.request.headers.add({
key: 'hmac',
value: hash
});
Note:
1. All token values in calls and responses will be in base value.
Token Symbol Base
Bitcoin btc 100000000
Ethereum eth 1000000000000000000
Ripple xrp 1000000
Stellar xlm 10000000
True USD tusd 1000000000000000000
Multi-Collateral Dai dai 1000000000000000000
Tether usdt 1000000
USD Coin usdc 1000000
Basic Attention Token bat 1000000000000000000
Paxos pax 1000000000000000000

2. All KYC documents are auto-approved in 30 seconds without verification in the test environment
3. INR Deposits confirmations are auto-approved without verification. INR withdrawals will remain in pending state.
4. For ETH and ERC20 tokens transaction, kovan network is used in testnet.
5. We dont prefill crypto wallets with any tokens, so please transfer testnet funds to your assigned wallet address for smooth exchange to and from fiat.
6. Fee Structure
Token Withdrawal Deposit Exchange Fees
BTC 0.0004 BTC 0 0.25
ETH 0.003 ETH 0 0.25
TUSD 0.6 TUSD 0 0.25
DAI 0.6 DAI 0 0.25
PAX 0.6 PAX 0 0.25
USDT 0.6 USDT 0 0.25
USDC 0.6 USDC 0 0.25
XRP 0.6 XRP 0 0.25
XLM 0.01 XLM 0 0.25
BAT 2 BAT 0 0.25
INR 0 0 0.25

7. Minimum amount for deposit to reflect is $1 worth of token being deposited.
8. Minimum amount for withdrawal is $5 worth of token being withdrawn.
9. Minimum amount to exchange is at least $10 worth of token being exchanged.
10. All responses will have the following format
                            
{
  success: true / false,
  data: {//in case of success true
  [JSON data with relevant fields]
  },
  error: {//in case of success false
    message: “Single line error”,
    stack: “reason for failure”
  }
}
                            
                          
Sample response format : Success
                            
{
success: true
data: {
  Name: “Rajesh Kumar”
 }
}

                            
                          
Sample response format : Failed
                            
{
success: false
error: {
    message: “403”,
    stack: “This user already exists on our platform”
  }
}


                            
                          
In the documentation below, only the data part of the response will be mentioned.
User Module
Creating user account
HTTP POST Request
{{url}}/users/create
Request Parameters
Parameter comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userIdentifier A unique identifier of the user. Can be alphanumeric value. Will be used to identify a user from your end
Response Data
Parameter comments
success true or false based on whether user creation succeeded or failed
userID Unique identifier of the user on our platform. (This ID will be used to identify the user in all our other APIs.)
Get User Details
HTTP POST Request
{{url}}/users/details
Request Parameters
Parameter comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user
Response Data
Parameter Value Comments
userID The ID of the user who created the request
kycStatus {
status: failed,
cause:”invalid document”
}
There can be 5 status:
1. success
2. open
3. failed
4. pending
5. notSubmitted
If failed, cause will also be mentioned Status is open when KYC basic is submitted but Documents are not uploaded
inrBalance {balance:amount, locked: amount}
crypto [{token: “btc”, address:”btcaddr”, balance:”value”, locked:”value”}] 'balance' and 'locked' is in base value, for Eg: 1 ETH will be 1000000000000000000
depositBankDetails {name:”name”, accountNumber:”accNo”, ifsc:”ifsc”} Account to which the user should deposit for the INR to be reflected in his account
withdrawBankDetails [{accountID:”id”, name:”name”, accountNumber:”accNo”, ifsc:”ifsc”}] Array of all accounts added by the user
Get All Transactions
HTTP POST Request
{{url}}/users/txns
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user
Response Data
Parameter Comments
txns Array of all transactions by the user
KYC Module
Submit basic information
HTTP POST Request
{{url}}/kyc/submitKYC
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user
legalName Full name as per documents submitted
phone(Optional) Phone number
email Email of the user
country Country of the user (Pass INDIA if you want to do INR transactions)
pan Pan number of the user
Response Data
Parameter Value Comments
userID The ID of the user who created the request
kycStatus { status: failed, cause:”invalid document” } There can be 5 status:
1. success
2. open
3. failed
4. pending
5. notSubmitted
If failed, cause will also be mentioned Status is open when KYC basic is submitted but Documents are not uploaded
kycStatus { status: failed, cause:”invalid document” } There can be 3 status:
1. success
2. open
3. failed
4. pending
If failed, cause will also be mentioned Status is open when KYC basic is submitted but Documents are not uploaded
Request for upload url
HTTP POST Request
{{url}}/kyc/getUploadUrl
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user
Response Data
Parameter Comments
documentFront URL to upload document front side
documentBack URL to upload document back side
selfie URL to upload document selfie
Upload images
HTTP PUT Request
Upload the three images to the url received from the previous step and confirm your upload with the next step.
Confirm upload
HTTP POST Request
{{url}}/kyc/confirmUpload
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user
documentType Type of document was uploaded. Supported types: passport/aadhaar/DL
Get KYC Status
HTTP POST Request
{{url}}/kyc/getKYCStatus
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user
Response Data
Parameter Comments
status There can be 5 status
1. accepted
2. open
3. failed
4. pending
5. notSubmitted
If failed, cause will also be mentioned
Status is open when KYC basic is submitted but Documents are not uploaded
Deposit/Withdraw Module
Integrate Instant Payment SDK
Add this script in the head section of your index.html
<script type="text/javascript" src="https://bohstaticfiles.s3.amazonaws.com/cardsSDK_v1_0.min.js"></script>
This SDK is for test environment. You may request us for the production SDK after successfully integrating and testing the functionality. You can initiate an instant payment by the following function that is exposed via BoH object on the window
window.BoH.makeInstantPayment(paymentRequest, 'paymentEl', successCallbackFn, errorCallbackFn);
Method Parameters
Parameter Comments
paymentRequest A javascript object with the following key value pairs:
{
  amount: 100.50,
  userID: 'The userID returned while creating the user
          (NOTE: Completing the users KYC is a mandatory
          prerequisite for this API)',
  orgID: 'Your organisation ID (contact hello@vauld.com
          if you do not have one)',
  apiKey: 'Your API key'
}
                              

The amount passed should be a valid javascript number
paymentEl The id of the html DOM element (preferably a full width div element) in which the payment page would be rendered on the website
successCallbackFn The javascript callback function to be invoked in case of a successful transaction. The response object passed as the argument to the function would be of the format:
{
  status: 'success',
  message: 'The server message',
  amount: 'The amount that has been added to the users
          INR balance',
  updatedBalance: 'The updated balance in the INR wallet
                  after crediting the amount'
}
                              
errorCallbackFn The javascript callback function to be invoked in case of a failed transaction. The response object passed as the argument to the function would be of the format:
{
  status: 'fail',
  message: 'The server message',
  amount: 'The amount for which payment was attempted'
}
                              
You can cancel an ongoing payment by invoking the following method:
window.BoH.cancelOnGoingPayment();
Submit deposit confirmation (only needed till VA approved)
HTTP POST Request
{{url}}/fiat/paymentConfirmed
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user (NOTE: Completing the users KYC is a mandatory prerequisite for this API)
paymentID RTGS/IMPS/NEFT reference id
amount Amount in INR transferred for deposits
Response Data
Parameter Comments
txnID Reference ID for submitted deposit entry
Add withdraw bank account details
HTTP POST Request
{{url}}/fiat/addBankAccount
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user (NOTE: Completing the users KYC is a mandatory prerequisite for this API)
name Name of account holder
accountNumber Account number
ifsc IFSC code of bank account
Response Data
Parameter comments
accountID ID for the account just added. Pass this along when requesting withdrawal
status approved/rejected
error if rejected, reason for rejection
Request withdrawal
HTTP POST Request
{{url}}/fiat/requestWithdrawal
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user (NOTE: Completing the users KYC is a mandatory prerequisite for this API)
bankAccountID Bank account ID
amount Amount in String
Response Data
Parameter comments
message Comments for readability of the transaction
txnID Reference ID for submitted withdrawal entry
Buy/Sell Module
Fetch Price
HTTP POST Request
{{url}}/fiat/getAllPrice
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
Response Data
Parameter Value Comments
allPair
                            
[
  {
      "pair": "BTC/INR",
      "bid": "909657.04",
      "ask": "909784.70"
  },
  {
      "pair": "XRP/INR",
      "bid": "24.06",
      "ask": "24.06"
  },
  {
      "pair": "XLM/INR",
      "bid": "8.49",
      "ask": "8.49"
  },
  {
      "pair": "TUSD/INR",
      "bid": "78.23",
      "ask": "78.24"
  },
  {
      "pair": "USDC/INR",
      "bid": "78.23",
      "ask": "78.24"
  },
  {
      "pair": "BAT/INR",
      "bid": "20.18",
      "ask": "20.21"
  },
  {
      "pair": "PAX/INR",
      "bid": "78.23",
      "ask": "78.24"
  },
  {
      "pair": "ETH/INR",
      "bid": "31283.36",
      "ask": "31285.71"
  },
  {
      "pair": "DAI/INR",
      "bid": "79.42",
      "ask": "79.46"
  },
  {
      "pair": "BUSD/INR",
      "bid": "78.24",
      "ask": "78.25"
  }
]
                            
                          
Current bid and ask for token pairs, 'bid' and 'ask' is in INR
Get Token Exchange Amount
HTTP POST Request
{{url}}/fiat/getPrice
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
amount Amount is in base value, Eg: if 1 ETH is required, pass 1000000000000000000
type buy/sell
token Name of token “btc”, ”eth” etc
Response Data
Parameter Comments
baseToken Token symbol which is getting exchanged
quoteToken Token symbol to which exchange is desired
baseAmount 'baseAmount' is in base value. Eg: 1 ETH will be 1000000000000000000
quoteAmount 'quoteAmount' is in base value. Eg: 1 ETH will be 1000000000000000000
exType Type of exchange
Create order
HTTP POST Request
{{url}}/fiat/createOrder
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user (NOTE: Completing the users KYC is a mandatory prerequisite for this API)
type buy/sell
token Name of token “btc”, ”eth” etc
inrAmount INR value
tokenAmount tokenAmount (amount is in base value, e.g if 1 ETH is required, pass 1000000000000000000)
Response Data
Parameter Value Comments
orderID value Order ID of the order placed. Can be used to track transaction
Get order status
HTTP POST Request
{{url}}/fiat/details
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user (NOTE: Completing the users KYC is a mandatory prerequisite for this API)
orderID ID of the order placed
Response Data
Parameter Value Comments
orderStatus success/failed/pending
type buy/sell
depositToken btc Name of token “btc”, ”eth” etc
destinationToken inr Name of token “btc”, ”eth”, "inr" etc
depositAmount Deposit token value
destinationAmount Destination token value
Get all Orders
HTTP POST Request
{{url}}/fiat/orders
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user (NOTE: Completing the users KYC is a mandatory prerequisite for this API)
Response Data
Parameter Value Comments
orderDetails
                            
[
  {
    orderStatus:”success”,
    type:”buy”,
    token: “btc”,
    inrAmount:”10”,
    tokenAmount:”100000000”
  }
]
                            
                          
'tokenAmount' is in base value, Eg: 1 ETH will be 1000000000000000000
Send crypto
Send
HTTP POST Request
{{url}}/wallets/send
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user
token tokenName
amount Amount to withdraw
receiver Address to send token to
Response Data
Parameter Value Comments
txnID value TxnID to track txns
Get txn status
HTTP POST Request
{{url}}/wallets/txnStatus
Request Parameters
Parameter Comments
orgID Your organisation ID (contact hello@vauld.com if you do not have one)
userID The userID returned while creating the user
txnID txnID received while trying to send
Response Data
Parameter Value Comments
status success/failed/pending
txnHash transaction hash txn hash will be sent if success