ms32035 / trading212-rest

Rest API client for Trading212
Apache License 2.0
4 stars 4 forks source link

enhanced readibility, fixed spelling mistakes and normalized code structuring #6

Open amstrdm opened 1 week ago

amstrdm commented 1 week ago

Ended up adding all new endpoints to the client. See commits for details but the two main endpoint sections I added are

Specifically:

Pie Endpoints:

  1. Get All Pies:

    • Endpoint: GET https://live.trading212.com/api/v0/equity/pies
    • Description: Retrieves a list of all pies in your account.
  2. Create a New Pie:

    • Endpoint: POST https://live.trading212.com/api/v0/equity/pies
    • Description: Creates a new pie with specified instruments and allocations.
  3. Delete a Pie:

    • Endpoint: DELETE https://live.trading212.com/api/v0/equity/pies/{id}
    • Description: Deletes a pie by its ID.
  4. Get a Specific Pie:

    • Endpoint: GET https://live.trading212.com/api/v0/equity/pies/{id}
    • Description: Retrieves details of a specific pie by its ID.
  5. Update a Pie:

    • Endpoint: POST https://live.trading212.com/api/v0/equity/pies/{id}
    • Description: Updates an existing pie with new allocations or instruments.

History Exports Endpoints:

  1. Get Exported History Files:

    • Endpoint: GET https://live.trading212.com/api/v0/history/exports
    • Description: Retrieves a list of all previously exported history files.
  2. Request a New History Export:

    • Endpoint: POST https://live.trading212.com/api/v0/history/exports
    • Description: Initiates a new export of your transaction history.