Git Product home page Git Product logo

trading-ace's Introduction

Trading Ace

Prerequisites

Install docker compose

Run Services

docker compose up

Worker

Modify Ethereum JSON RPC URL and task settings in ./build/worker/config/worket.dev.yml

API Service

The default port is 3000. This can be changed in the ./docker-compose.yml file.

List User Point Task States

GET /users/{address}/point-task-states

curl 'http://localhost:3000/users/0xF4ACDAC048C14c5E49BbEDe0C72444d806A75Cde/point-task-states'

Response body

{
  "status": "SUCCESS",
  "data": [
    {
      "address": "0x67CeA36eEB36Ace126A3Ca6E21405258130CF33C",
      "point": 100,
      "volume": "2660469101",
      "completed": true,
      "updated_at": "2024-07-25T16:54:29.617409Z",
      "task_name": "Onboarding Task",
      "task_type": "ACCOUNT_TRADING_VOLUME",
      "contract_address": "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc",
      "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "task_volume": "1000000000",
      "task_reward_point": 100,
      "task_status": "FINISHED",
      "start_time": "2024-07-01T00:00:00Z",
      "end_time": "2024-07-01T02:00:00Z"
    },
    {
      "address": "0x67CeA36eEB36Ace126A3Ca6E21405258130CF33C",
      "point": 29,
      "volume": "2660469101",
      "completed": true,
      "updated_at": "2024-07-25T16:54:29.627846Z",
      "task_name": "Share Pool Task",
      "task_type": "SHARE_POOL",
      "contract_address": "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc",
      "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "task_volume": "927847611814",
      "task_reward_point": 10000,
      "task_status": "FINISHED",
      "start_time": "2024-07-01T00:00:00Z",
      "end_time": "2024-07-01T02:00:00Z"
    }
  ]
}

List User Point Histories

GET /users/{address}/point-histories

curl 'http://localhost:3000/users/0xF4ACDAC048C14c5E49BbEDe0C72444d806A75Cde/point-histories'

Response body

{
    "status": "SUCCESS",
    "data": [
        {
            "address": "0xF4ACDAC048C14c5E49BbEDe0C72444d806A75Cde",
            "point": 100,
            "task_name": "Onboarding Task",
            "task_type": "ACCOUNT_TRADING_VOLUME",
            "created_at": "2024-07-25T16:54:29.617409Z"
        },
        {
            "address": "0xF4ACDAC048C14c5E49BbEDe0C72444d806A75Cde",
            "point": 13,
            "task_name": "Share Pool Task",
            "task_type": "SHARE_POOL",
            "created_at": "2024-07-25T16:54:29.627846Z"
        }
    ]
}

trading-ace's People

Contributors

lokstory 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.