β‘Quick Start
Jump Right Into the Integration
External API
βοΈExternal API (Gitbook)
Subgraph
πSubgraphEthers
Integrate with Ethers.jsSolidity
πContracts OverviewLast updated
Jump Right Into the Integration
Last updated
GET /tokens/ HTTP/1.1
Host: ext.aktionariat.com
Accept: */*
[
{
"ticker": "DAKS",
"name": "Draggable Aktionariart AG Shares",
"description": "Aktionariat is a tokenization platform.",
"chain": "mainnet",
"register": "0x6f38e0f1a73c96cb3f42598613ea3474f09cb200",
"market": "https://investors.aktionariat.com",
"creation": 1,
"currency": "CHF",
"status": "TRADED",
"tokenType": "EQUITY",
"url": "https://investors.aktionariat.com",
"totalSupply": 1330000,
"marketCap": 18535743,
"issuer": {
"name": "Aktionariat AG",
"description": "Aktionariat is a tokenization platfrom for security tokens",
"url": "www.aktionariat.com",
"industry": "Fintech",
"foundingYear": 2020
}
}
]{
registry(id: "0xcb3e482df38d62e73a7ae0e15a2605cadcc5ae98"){
txCount
tokenCount
totalVolumeUSD
totalVolumeXCHF
}
}import { ethers } from "ethers";
let brokerbotAddress = "0x3A2148cEa2A8A4dAE51487fA28451038c24d2576"
const brokerbotABI = ["function getBuyPrice(uint256 shares) view returns (uint256)"];
async function main () {
const ethersProvider = new ethers.providers.InfuraProvider();
const wallet = ethers.Wallet.createRandom().connect(ethersProvider);
const brokerbotContract = new ethers.Contract(brokerbotAddress, brokerbotABI, wallet);
const price = await brokerbotContract.getBuyPrice(1);
console.log(Price to buy 1 share: ${price}`);
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});contract BuySharesExample {
//constants
IERC20 public constant XCHF = 0xB4272071eCAdd69d933AdcD19cA99fe80664fc08;
address public constant brokerbot = 0x3A2148cEa2A8A4dAE51487fA28451038c24d2576;
address public constant paymenthub = 0xD5608dEe5F0ed1A09B5cC3FEbB9B3Fc48e68057d;
function buySharesWithBaseToken(uint256 amountShares) external {
uint256 baseAmount = brokerbot.getPrice(amountShares);
//approve paymenthub to move base currency (XCHF)
XCHF.approve(paymenthub, baseAmount)
paymenthub.payAndNotify(brokerbot, baseAmount, "0x01");
}