goksei

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 6 Imported by: 0

README

goksei

Unofficial client library for AKSES-KSEI

Go Reference Go Report Card

Project status

Unstable proof of concept

Features

  • Login with username and (salted) password
  • Cache token on disk with auto relogin when expired
  • Get balance overview
  • Get balance for Equities, Mutual Funds, Bonds, and "Others"
  • Get cash balance
  • Command-line interface

Using as library

Get it as dependency

go get -u github.com/chickenzord/goksei

Example usages:


import "github.com/chickenzord/goksei/pkg/goksei"

func main() {
    client := goksei.NewClient("username", "saltedpassword")

    equityBalance, err := client.GetShareBalances(goksei.EquityType)
    if err != nil {
        panic(err)
    }

    // ...
}

Using as CLI

Create .env file with following content:

GOKSEI_USERNAME=youremail@domain.com
GOKSEI_PASSWORD=yoursaltedpassword

The salted password can be obtained by logging in with your account on https://akses.ksei.co.id/login and inspect the request payload sent by JS code.

Currently the CLI only serve as feature showcase. Run it with...

go run .

Disclaimer

This project is only for personal and educational purpose. Use on your own risk, there is no guarantee this project will always work when KSEI changed their API or policies.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL