Giter VIP home page Giter VIP logo

naga-web-api's Introduction

naga-web-api

Unofficial python client for NAGA.com social and trading platform. The library implements private API calls captured from NAGA.com web user interface.

Disclaimer

I am not associated with NAGA.com. I don't bear any responsibility if you end up losing money as a result of this library. The private API may change at any point in time in the future, use the library at your own risk.

Usage

Install from github:

pip install git+https://github.com/meister245/naga-web-api.git

Market History Collection

No login is required to collect market history data.

Example for data collection:

./scripts/collect_market_data.py

Authenticated Sessions

In order to use trading functionality and create authenticated sessions, a login request has to be inspected in browser developer tools.

After login action on the web UI, the response will contain a password hash. The hashed password value will always be the same.

Example API response: https://api-v2.swipestox.com/user/login

{
    "user_name":"USERNAME",
    "password":"HASHED_PASSWORD_VALUE",
    "device_uuid":"e469e0f03d85gd9365d12891fa842e51",
    "g-recaptcha-response":null,
    "get_user_info":true
}

Broker Accounts

Naga.com offers multiple trading accounts, where each account is a separate logical entity, which requires an individual session to be established for each of the accounts.

By default the DEMO account is used.

Example for listing trading accounts:

./scripts/linked_accounts.py

Trading

Example for opening, updating and closing trades:

./scripts/open_close_trade.py

naga-web-api's People

Contributors

meister245 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

naga-web-api's Issues

Empty responses

Hey, thanks for taking your time to create this. I've followed your example script for getting market history: Getting a guest session and requesting data seems to work fine, however, all arrays inside the responses are empty:

{'success': True, 'info': {'code': 200, 'message': ''}, 'errors': [], 'data': {'c': [], 'h': [], 'l': [], 'o': [], 's': 'ok', 't': [], 'v': []}, 'req_id': '#somerequestid'}

I've double checked, whether the symbols exist and checked browser requests,
Any ideas?

User Parser

I like this project even if I can use Metatrader to download and automate stuff.

I would like to see a parser for the realtime-trades on startpage and more important: a parser for the user list with statistics, copiers and the last 10 trades.
Background is, that I am a european non-professional trader with small leverage/other conditions and the search-filter does not allow to to see other non-professional traders with european account only. Another problem is, that the tax for gold and crypto differs from the other assets, so I would like to skip traders who mainly trade this.

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.