banpagi/trading212import

Import csv files from trading 212

v0.0.3 2024-10-03 17:26 UTC

This package is auto-updated.

Last update: 2024-11-03 17:41:27 UTC


README

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Open a command console, enter your project directory and execute:

composer require banpagi/trading212import

To use, export a file from Trading212

<?php
use Banpagi\Trading212\CvsTransformer;
use Banpagi\Trading212\CsvReader;

$reader = new CsvReader($filename);
$reader->setFieldDelimiter(',');        
$rows = $reader->getRows();
       
$worker = new CvsTransformer();
$data = $worker->process($filename, $rows);

This will give you a Collection for futher processing.