Skip to content

liquifi-org/liquifi-api

Repository files navigation

Liquifi API

Prerequisites

Install Yarn

$ npm install -g yarn

Install Dependencies

$ yarn install

Calling functions locally (Ropsten Network)

Summary

$ yarn sls invoke local --function summary --ethereum-network=ropsten

Assets

$ yarn sls invoke local --function assets --ethereum-network=ropsten

Tikers

$ yarn sls invoke  local --function tickers --ethereum-network=ropsten

Trades

$ yarn sls invoke local --function trades --ethereum-network=ropsten -d '{"pathParameters": {"pair": "0xc778417E063141139Fce010982780140Aa0cD5Ab_0xaD6D458402F60fD3Bd25163575031ACDce07538D"}}'

$ yarn sls invoke local --function trades --ethereum-network=ropsten -d '{"pathParameters": {"pair": "0xaD6D458402F60fD3Bd25163575031ACDce07538D_0xc778417E063141139Fce010982780140Aa0cD5Ab"}}'

Order Book

$ yarn sls invoke local --function orderbook --ethereum-network=ropsten -d '{"pathParameters": {"pair": "0xc778417E063141139Fce010982780140Aa0cD5Ab_0xaD6D458402F60fD3Bd25163575031ACDce07538D"}}'

$ yarn sls invoke local --function orderbook --ethereum-network=ropsten -d '{"pathParameters": {"pair": "0xaD6D458402F60fD3Bd25163575031ACDce07538D_0xc778417E063141139Fce010982780140Aa0cD5Ab"}}'

Deploying the API

The API uses the serverless framework and can easily be deployed to any AWS account, via the yarn deploy command or yarn deploy:{ethereum-network}.

In order to configure your AWS account as a target, see the serverless docs.

Config variables

Config variables are located within serverless.yml: custom.config.{ethereum-network}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors