Koine docs

The bot

Every command, screen and button in @koinemarketsbot for trading. Trading works only in a private chat with the bot.

The bot isn't offered yet. Use the web terminal (wallet-accounts.md). Turning it on is described in deploy/README.md (section 6).

Commands #

The first twelve appear in Telegram's menu in private chats. The others work when typed.

Command What it does
/start Opens Home (or sets up your account the first time)
/positions What you hold, with buttons to open and sell each
/history Your last 15 trades and your total realized
/wallet Address, balance, withdrawals and key export
/limits Your open limit buys and limit sells, to cancel
/presales Koine presales open now (see Presales)
/knots The limits you tie yourself
/stop Ties โ›” Stop all buying now and offers to sell everything
/withdraw Sends SOL to your saved address
/settings Slippage, speed and buy buttons
/ref Your referral link and stats
/help A short guide and the support link
/home Opens Home
/buy Asks for a token address
/sell Same as /positions
/rules Same as /knots
/address Shows your withdrawal address. /address <address> saves or changes it
/export Opens the key export screen
/refcode Picks a name for your referral link. /refcode <name> sets it directly
/terms Shows the notice
/fees States Koine's fee and what else a trade pays

Until you have a wallet, pasting a token gets the welcome message. Until you choose your untie delay, only /help, /terms, /fees, /stop, /positions, /sell and /history work.

Admins also have /halt, /resume, /wallets and /invite. For anyone else these open the help screen.

Source: trade/server/telegram.ts (registerCommands), trade/server/bot.ts (onMessage, DELAY_FREE_COMMANDS)

Typing into the bot #

  • Paste a token address, or any text or link that contains one, to open its card. If a message holds several addresses, one ending in pump is preferred.
  • When the bot asks for a value, answer in the reply box. Send cancel, stop or no to back out. A question lapses after 10 minutes, and sending a command cancels it.

Source: trade/server/bot.ts (findMint, onMessage)

Home #

/start and /home show your balance (with a dollar estimate), how many positions you hold and their estimated value and change, how many knots are tied, your untie delay, anything untying, and your buy slippage and speed. If you've stopped buying, Home says so at the top.

Button Goes to
๐ŸŸข Buy Asks for a token
๐Ÿšช Exits The exit knots
๐Ÿ“Š Positions Positions
๐Ÿ’ผ Wallet Wallet
๐Ÿชข Knots Knots
โš™๏ธ Settings Settings, Web sign-ins and Refer friends
โ“ Help The short guide and support on X
๐Ÿ”„ Refresh Reloads Home
โ›” Stop buying Ties the kill switch. Shows โ›” Buying stopped once tied

Buttons edit the same message. A โ† button goes up a level and ๐Ÿ  Home returns home. Token cards, quotes and fills arrive as their own messages, so they stay as a record.

Buttons that move money or keys out (confirm a withdrawal, save a first address, request an export, confirm a presale deposit or withdrawal) carry a one-time token that lasts 10 minutes. An older button says it has expired.

Source: trade/server/bot.ts (home, issueAction, spendAction)

The token card #

The card shows free facts from Jupiter (market cap, liquidity, holders, launchpad), what you hold of the token, your balance, and your buy slippage and speed. A Koine launch in its presale opens on the presale screen instead.

Button What it does
๐ŸŸข Buy (amount) One per buy button in your settings
๐ŸŸข Buy X SOL Asks how much SOL to spend
๐ŸŸข Buy max Spends the most the wallet can cover
๐ŸŽฏ Limit buy Sets a limit buy
๐Ÿ”„ Refresh Redraws the card
๐Ÿ”ด Sell 50%, ๐Ÿ”ด Sell 100% Shown when you hold the token
๐Ÿชข Knots, โš™๏ธ Settings, ๐Ÿ  Home Those screens

A buy shows a quote: about how much you get, the least you'd accept at your slippage, Koine's fee, the tip, the speed and the route. If your wallet has no account for that token yet, it also shows the rent for one, about 0.0021 SOL, which comes back when the account is closed after you sell. Tap โœ… Confirm buy or โœ–๏ธ Cancel. A quote lasts 10 minutes. See how a buy runs.

If a knot holds the buy, you see which knot and why, with a button to it. The fill message shows what you got, what it cost, the time from press to landing and a Solscan link.

Source: trade/server/bot.ts (showCard, cardScreen, cardHead, buy, run), trade/server/trading.ts (quoteBuy, ATA_RENT), trade/server/tokeninfo.ts

Positions and selling #

/positions lists your 20 most recently opened positions with estimated value and change, and has ๐Ÿ”ด Sell everything, ๐Ÿ“‹ Limit orders, ๐Ÿ“œ History and ๐Ÿ”„ Refresh.

Tap a position to see what you hold, its cost, its estimated value and change, realized profit or loss, and your exits in SOL.

Button What it does
๐Ÿ”ด Sell 25%, 50%, 100% Sells at once, with no second confirm
๐Ÿชœ This position's exits Takes, a stop and limit sells for this position. See Exits
๐ŸŸข Buy more Opens the token card
๐Ÿ“ˆ Chart Opens Dexscreener
๐Ÿ”„ Refresh Reloads the position
๐Ÿ™ˆ Hide Shown when there's no price. Takes it off the list

A hidden position is still open: it counts toward your knots, exits still watch it, Sell everything still sells it, and it comes back if you buy the token again. ๐Ÿ™ˆ Show N hidden brings them back.

๐Ÿ”ด Sell everything asks once more, then sells every open position at your sell slippage, including hidden ones and any past the 20 shown.

Source: trade/server/bot.ts (positionsScreen, positionScreen, sellEverything), trade/server/trading.ts (hidePosition, sellEverything)

Wallet #

/wallet shows your address, balance, withdrawal address, and any waiting withdrawal, address change or export.

Button What it does
๐Ÿ“‹ Copy address Copies the deposit address
๐Ÿ”„ Refresh Reloads the balance
โฌ†๏ธ Withdraw Choose 25%, 50%, All or โœ๏ธ Other amount, then โœ… Withdraw
๐Ÿ“ฎ Withdrawal address Save or change the one address withdrawals go to
โœ–๏ธ Cancel withdrawal Shown while a withdrawal is waiting
๐Ÿ”‘ Export key Request the wallet's private key
๐Ÿ”Ž Solscan Opens the wallet on Solscan

Other amount takes a number of SOL, or all. On the address screen, โœ–๏ธ Stop the change cancels a change that's waiting. See withdrawals and key export.

Source: trade/server/bot.ts (walletScreen, withdrawScreen, addressScreen, exportScreen)

Knots #

/knots shows what's tied, your untie delay, anything waiting to untie, and how knots work. Buttons open ๐Ÿงฉ Start from a style, the groups (๐Ÿšช Exits, ๐Ÿ“ Size, ๐Ÿง˜ Discipline, ๐Ÿ”ญ Scan) and ๐Ÿ”’ Untie delay. Each knot's screen offers presets and โœ๏ธ Other value (or ๐Ÿชข Tie it for an on-or-off knot), and โœ‚๏ธ Untie once it's tied. A value marked โณ will wait your untie delay. โœ–๏ธ Stop untying cancels a waiting loosening.

When you tie your first knot with no untie delay, the bot offers ๐Ÿ”’ Set an untie delay.

Full table: Knots.

Source: trade/server/bot.ts (knotsScreen, knotGroupScreen, knotScreen, requestKnot)

Settings #

Setting Options Starts at
๐ŸŸข Buy slippage 5%, 10%, 15%, 25%, 50% 10%
๐Ÿ”ด Sell slippage 5%, 10%, 15%, 25%, 50% 15%
Speed โšก Fast (0.00001 SOL tip), ๐Ÿš€ Turbo (0.001 SOL tip) โšก Fast
๐Ÿ’ฐ Buy buttons Tap one to set a new SOL amount, up to 1,000 0.1, 0.25, 0.5 SOL

Settings also link to ๐Ÿชข Knots, ๐Ÿ–ฅ Web sign-ins (see each signed-in browser and sign it out, or sign out everywhere) and ๐ŸŽ Refer friends. Settings aren't knots: they change at once.

Source: trade/server/bot.ts (settingsScreen, slippageScreen, speedScreen, presetsScreen, sessionsScreen), trade/server/users.ts, trade/server/db.ts

Referrals #

/ref shows your link, how many people joined with it, their trades and fees, what you've earned, been paid and are due, and your current rate. The web Referrals tab shows the same.

Your link is https://t.me/koinemarketsbot?start=r_<code>. The bot also shows a short link, koine.markets/r/<code>. It opens the web terminal and remembers the code in that browser, so a sign-up there joins as your referral (see Accounts and sign-in). Someone who opens it and then joins in the bot isn't linked to you; for the bot, share the t.me link.

Traders who join through a link pay 0.9% instead of 1%. You earn a share of the fees they pay, by what your referred traders paid over the last 30 days. Each rate applies only to the fees inside its band:

Their fees in 30 days Your share
Up to 5 SOL 30%
5 to 25 SOL 35%
25 to 100 SOL 40%
Over 100 SOL 45%

Fees from a sell that made a profit earn 10 points more. There's no second level.

Payouts go to your Koine wallet on chain about once a day, with no claim step, while Koine's payout wallet (TRADE_REFERRAL_PAYOUT_KEYPAIR) is set and funded. Until then your share adds up unpaid. An amount too small for an empty wallet to receive (under 0.00089088 SOL) waits until there's enough.

A referred trader earns you nothing if you two look like one person: money moved between your wallets or saved addresses, or both funded with at least 0.001 SOL from the same address that isn't one of 14 listed exchange wallets (EXCHANGES in trade/server/referrals.ts). They keep their 0.9% fee.

โœ๏ธ Choose a name or /refcode sets a name of 3 to 32 letters, digits or _. You can pick a new name 3 times. Some names are reserved, as is anything starting with koine. Old links keep working.

If someone opens your link while they can't yet join (invite-only mode), Koine remembers it and counts them as your referral when they do.

Source: trade/server/referrals.ts, trade/server/users.ts (claimVanity, vanityProblem, noteProspect, referralLink), trade/server/bot.ts (referralScreen), trade/server/web.ts (referrals)

Help and support #

/help has a short guide. For questions or problems, DM @koinemarkets on X. Koine never asks for your key.

Source: trade/server/bot.ts (helpScreen, SUPPORT_URL)

Admin commands #

For Koine's admins (TRADE_ADMIN_IDS), not traders.

Command What it does
/halt buys|sells|withdrawals|keys|all [reason] Pauses that for everyone. No argument means buys. See admin halts
/resume buys|sells|withdrawals|keys|all Ends a halt
/wallets Lists wallets for admins
/invite [uses] Makes an invite link for 1 to 100 people, valid 14 days

Source: trade/server/bot.ts (haltCommand, makeInvite), trade/server/users.ts (createInvite)