Giter Site home page Giter Site logo

ebaytrader's Introduction

ebayTrader: Web app for sniping eBay items faster than the built-in timer onsite

uses mongoDB, nodeJS

Behavior overview:

(a) User configures queries that capture a target set of filters. Previous history of eBay auctions can be pulled to verify how well-target the filter(s) are.

(b) backend stores queries and periodically runs them against ebay API (every minute). All newly found items are e-mail to the user with gmail SMTP relay.

(c) backend keeps track of the items already sent to the user, so dups are never e-mailed.

DB organization: database for queries and database for seen items.

Backend specs:

Server side processes JSON queries for eBay API calls and runs periodic crontab jobs to check if there are new items matching the search parameters.

Query format: (1) Mandatory text field: name (2) Mandatory text field: ebay search keywords (normal syntax including +/- etc) (3) Mandatory text field: minimum price (4) Mandatory text field: maximum price (5) Optional text field: ebay category ID (6) Mandatory text field: email (7) Mandatory text field: deployed (options true/false/delete/drop)

deployed field behavior: true - query is active and runs in crontab false - query exists but is inactive delete - query is deleted from database drop - database of seen items is dropped (all searches continue running anew)

JSON API:

API Path /api method: GET

Action: returns a list of configured queries, does not update DB For example:

{ "queries": [ { "_id": "592d131e4a7ca13801ceb2bf", "name": "retina", "keywords": "macbook retina", "mPrice": "100", "xPrice": "1000", "categoryID": "175672", "email": "[email protected]", "deployed": "false" }, { "_id": "592df9364a7ca13801ceb569", "name": "touchbar", "keywords": "macbook touchbar -read", "mPrice": "400", "xPrice": "1200", "categoryID": "175672", "email": "[email protected]", "deployed": "true" } ] }

API Path /api/:name method: POST

Udpdates an existing query/renames or creates a new one, saving into DB. All fields are required except categoryID

body fields "name" "keywords" "mPrice" "xPrice" "categoryID" "email" "deployed"

API Path /api method: POST

returns eBay query result for previously sold items matching the query parametea. This query does not have to exist in the database and is not saved.

body fields "name" "keywords" "mPrice" "xPrice" "categoryID" "email" "deployed"

crontab behavior:

KNOWN CAVEATS:

  1. Heroku puts an app to sleep if no frontend activity, which suspends crontab. This means the queries are active for few minutes after acessing the backend and then search stops.

This is not an issue for locally configured node.js and mongodb setup.

  1. gmail (google SMTP relay) is picky about source addresses. Sometimes Heroku moves services around, which might trigger Gmail auth errors resolvable via Gmail web interface.

This is not an issue for locally configured server as it has a permanent IP.

  1. eBay limits the number of responses per second in free API accounts. This means that if a query returns many items and/or there are many queries configured, some may not result in a valid JSON from eBay. I have not added an exception handler for this as scaling is not a goal for this project.

ebaytrader's People

Contributors

volkfox avatar

Watchers

James Cloos avatar  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.