Coder Social home page Coder Social logo

0xchange-server's Introduction

0xchange-server

This is the server component of the 0xchange project for ETHWaterloo 2017!

We won the 0x API Prize!

API reference:

GET: /order - gets all orders in the DB

POST: /order - gets some orders in the DB

  • body:
{
  sortBy: DBColumnID
  asc: acending? true/false
  limit: numberPerPage
  page: pageNumber
  (tokenAddress: address)
}
  • Possible sortBy columns: makerfee, makertokenaddress, makertokenamount, takerfee, takertokenaddress, or takertokenamount

POST: /order/new - adds new order to DB if valid

  • body: ZeroEx.SignedOrder

GET: /token - gets all tokens in the DB

POST: /token/new - adds new token to DB

  • body: address, symbol, name, & decimals

Setup

npm i

Make a config.js file like this:

module.exports = {
  infuraURL: 'https://mainnet.infura.io/YOUR_TOKEN',
  pg: {  // node-postgres config
    host: '',
    user: '',
    password: '',
    database: ''
  }
}

Making a PostgreSQL database

Run server

npm run serve

  • On port 3000 for now

0xchange-server's People

Contributors

gfjhogue avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.