An api to get ledger using a wallet address.
- Perform a clone of this repo
git clone https://github.com/arbazsiddiqui/etherAPI
- Install the required packages
nvm use && npm install
. - Run the server
npm start
. - This will start the server at port
8000
and withrinkeby
network. To usemainnet
network start the server usingNETWORK=mainnet npm start
. - To run tests use
npm t
.
An api to get ledger using a wallet address.
-
URL
/api/v1/getLedger?walletAddress=0xad57e734a41d231650b9085580a4559d87128031
-
Method:
GET
-
URL Params
Mandatory:
walletAddress=string
Wallet address of the wallet to want to fetch ledger for. -
Success Response:
- Code: 200
Content:{ "message": "OK", "result": { "walletAddress": "0xad57e734a41d231650b9085580a4559d87128031", "withdrawals": [{}], "deposits": [{}] } }
- Code: 200
-
Error Response:
- Code: 500 Internal Server Error
Content:{ "message": "Something went wrong" }
- Code: 500 Internal Server Error
-
Sample Curl:
curl --location --request GET 'http://localhost:8000/api/v1/getLedger?walletAddress=0xad57e734a41d231650b9085580a4559d87128031'