Skip to content

API Documentation

Xtrendence edited this page Nov 16, 2021 · 5 revisions

Image

API Documentation

I'll try to keep the API documentation updated, but I cannot guarantee this as constantly updating it while the software is under development would take a lot of time.

/api/accounts/

The "platform" should always be passed as a GET query string in the URL like so: login.php?platform=web, and the rest of the data would be sent as JSON.

POST create.php

Parameter Type Notes
username String The username of the admin creating the account.
account String The username to create an account for.
token String -

DELETE delete.php

Parameter Type Notes
username String The username of the admin deleting the account.
account String The username of the account to delete.
token String -

POST login.php

Parameter Type Notes
token String Only required if platform and password are empty.
platform String Only required if token is empty. Must be "app", "desktop", or "web".
username String Always required.
password String Only required if token is empty.

GET logout.php

Parameter Type Notes
token String -
platform String -
username String -

GET read-all.php

Parameter Type Notes
username String -
token String -

GET read.php

Parameter Type Notes
username String -
token String -

PUT update.php

Parameter Type Notes
currentPassword String -
newPassword String -
username String -

/api/activity/

POST create.php

Parameter Type Notes
token String -
id String CoinGecko coin ID
symbol String Coin ticker.
date String Must be parsable by PHP's strtotime().
type String Must be "buy", "sell", or "transfer".
amount Int -
fee Int -
notes String -
exchange String Only usable if type is "buy" or "sell".
pair String Only usable if type is "buy" or "sell".
price Int Only usable if type is "buy" or "sell".
from String Only usable if type is "transfer".
to String Only usable if type is "transfer".
username String Always required.

DELETE delete.php

Parameter Type Notes
token String -
txID String -
username String -

GET export.php

Parameter Type Notes
token String -
username String -

POST import.php

Parameter Type Notes
token String -
rows Array Order: txID (can be left as "-"), id, symbol, date, type, amount, fee, notes, exchange, pair, price, from, to
username String -

GET read.php

Parameter Type Notes
token String -
username String -

PUT update.php

Parameter Type Notes
token String -
txID String -
id String CoinGecko coin ID
symbol String Coin ticker.
date String Must be parsable by PHP's strtotime().
type String Must be "buy", "sell", or "transfer".
amount Int -
fee Int -
notes String -
exchange String Only usable if type is "buy" or "sell".
pair String Only usable if type is "buy" or "sell".
price Int Only usable if type is "buy" or "sell".
from String Only usable if type is "transfer".
to String Only usable if type is "transfer".
username String Always required.

/api/coins/

GET read.php

Parameter Type Notes
token String -
symbol String Coin ticker. If used, "id" must be left empty.
id String CoinGecko coin ID. If used, "symbol" must be left empty".
username String -

/api/historical/

DELETE delete.php

Parameter Type Notes
token String -
username String -

GET read.php

Parameter Type Notes
username String -
token String -
ids String The CoinGecko IDs of the coins to fetch the historical data of. Separated by commas.
currency String The fiat currency to show the coin prices in.
from String UNIX timestamp for start of date range.
to String UNIX timestamp for end of date range.
background String If set to "true", the price data is fetched and cached, but not returned as a response to the GET request.

/api/holdings/

POST create.php

Parameter Type Notes
token String -
id String CoinGecko coin ID.
symbol String Coin ticker.
amount Int -
username String -

DELETE delete.php

Parameter Type Notes
token String -
id String -
username String -

GET export.php

Parameter Type Notes
token String -
username String -

POST import.php

Parameter Type Notes
token String -
rows Array Order: id, symbol, amount
username String -

GET read.php

Parameter Type Notes
token String -
username String -

PUT update.php

Parameter Type Notes
token String -
id String CoinGecko coin ID.
amount Int -
username String -

/api/settings/

GET read.php

Parameter Type Notes
token String -
username String -

PUT update.php

Parameter Type Notes
token String -
key String -
value String -
username String -

/api/watchlist/

POST create.php

Parameter Type Notes
token String -
username String -
id String CoinGecko coin ID.
symbol String -

DELETE delete.php

Parameter Type Notes
token String -
username String -
id String CoinGecko coin ID.

GET read.php

Parameter Type Notes
token String -
username String -