Ronin Wallet to Koinly CSV Exporter
This project is a Go application that reads transaction data from the Ronin wallet API and exports it to a CSV file in the Koinly format.
Features
- Fetches transaction data from the Ronin wallet API.
- Parses the transaction data.
- Exports the data to a CSV file compatible with Koinly.
Requirements
- Go 1.16 or higher
- Internet connection to access the Ronin wallet API
Installation
-
Clone the repository:
git clone https://github.com/yourusername/ronin-to-koinly.git
cd ronin-to-koinly
-
Install the required Go packages:
go get -u github.com/go-resty/resty/v2
go get -u github.com/gocarina/gocsv
Usage
-
Update the API endpoint in the main.go
file to point to your Ronin wallet API endpoint.
resp, err := client.R().Get("https://api.roninchain.com/wallet/transactions")
-
Build and run the application:
go build -o ronin-to-koinly
./ronin-to-koinly
-
The application will create a koinly_transactions.csv
file in the current directory with the transaction data.
Example
Here is an example of the CSV output:
Date,Sent Amount,Sent Currency,Received Amount,Received Currency,Fee Amount,Fee Currency,Tag
2024-08-04 08:00:00,0.5,ETH,100,USD,0.01,ETH,Trade
2024-08-04 09:00:00,1.0,ETH,200,USD,0.02,ETH,Trade
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgements
- Resty - Simple HTTP and REST client for Go inspired by Ruby rest-client.
- GoCSV - The Go library for CSV serialization and deserialization.
For any questions or suggestions, feel free to open an issue or contact me at [rios0rios0@outlook.com].