PaydayAPI
Guides

Trade any pump.fun coin OTC

Lock coins at your price, fill an offer, cancel or return it: one wallet-signed transaction each.

The OTC locker lets one wallet sell any pump.fun coin to another at a price the seller sets. The coins wait in a vault owned by an on-chain program (the locker) until someone buys them. Payday never holds the coins, never signs for anyone and has no key that can move them.

The locker runs on Solana mainnet (program 7TW1MVpj9gMUQLcQRzdnKbc62Hw5Py3YbF7ehKA61j6C). Its routes are part of the API at https://dev.payday.direct/api/v1/otc and need an approved API key like every other call: the same per-key limits, daily quota and errors. The key only lets you build and read; every transaction is signed by the wallet itself, and no key, yours or Payday's, can move coins in the locker. GET /otc/config says which network and whether it is ready.

How a trade works

  1. The seller lists. POST /otc/list builds one transaction that opens the offer and moves the coins into its vault. The price is one of three: a dollar market cap (usd: the buyer pays SOL at SOL's price the moment the fill lands, for a coin of any pairing), a fixed SOL amount (fixed), or the market price with an offset from -5% to +5% (market). Every market offer has a floor it never sells under: by default the price at listing less 5%; a seller can set a lower one on purpose. The seller picks the expiry, from 10 minutes to 90 days, and can name the one wallet allowed to buy (a private deal), a smallest fill, and for market offers a floor it never sells under.
  2. The buyer fills. POST /otc/fill builds one transaction that does everything at once: the buyer pays in SOL, 95% goes to the seller, 5% goes to the Payday buy and burn, and the coins go to the buyer. If any part fails, nothing moves. A buyer can take part of an offer; the last buyer takes what is left.
  3. Or it closes. The seller can cancel at any time (POST /otc/cancel). Once an offer expires, anyone can send it back (POST /otc/return); the coins only ever go to the seller. Neither costs a fee.

Every route answers an unsigned transaction for the wallet in wallet. Have the wallet sign it (signTransaction, one transaction at a time), then send it with POST /otc/send and wait with GET /otc/confirm/{sig}. Payday test-runs every transaction before it answers, so a refusal comes back as a 400 with a code before anyone signs.

curl -X POST https://dev.payday.direct/api/v1/otc/fill -H "Authorization: Bearer $PAYDAY_API_KEY" -H "Content-Type: application/json" \
  -d '{"wallet":"BUYER_WALLET","listing":"LISTING_ADDRESS","amountRaw":"250000000000"}'

Fees

  • 5% of each fill, in SOL, out of the buyer's payment. The program takes it inside the fill and sends it to the address in its config, the payout wallet's PAYDAY burn stack, which buys and burns PAYDAY on its own pacing. Nothing is taken in the listed coin, and nothing is ever sold on your coin's chart, basket coins included.
  • No fee to list, cancel or return.
  • Network fees: each side pays its own (about 0.00001 SOL a transaction). The seller pays a deposit of about 0.0046 SOL to open the offer and its vault; it comes back to the seller when the offer closes. A buyer who has never held the coin pays to open their own token account.

Prices

Buyers always pay in SOL. Pages show every price as a market cap on the total supply.

Dollar market cap offers (usd). The seller names a price in dollars (totalUsdMicro, millionths of a dollar for the whole amount; the site takes a market cap). When a fill lands, the program reads SOL/USD from Pyth's SOL/USD price account (7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE, pinned in the program) and charges the SOL that is worth the dollars at that moment. It refuses a price that is not fully verified, older than 2 minutes, or with more than 1% uncertainty, so a stale or shaky price never sets what a buyer pays: errCode 6032, 6033 or 6034, and nothing moves. The buyer's limit (maxPay) is the quote plus 1%. This works for a coin of any pairing (SOL, USDC, a stock or any other token), because the price is the seller's, in dollars, and only SOL's own price is read.

Market price offers (market). A market offer reads the price on chain at the moment it fills, from the coin's pump.fun bonding curve or, once it has graduated, its pump.fun pool (vault plus the pool's signed virtual reserve), and records it on the fill (lockedPrice). Only coins whose own curve or pool trades against SOL take market offers; a coin paired with USDC or anything else takes a dollar market cap offer. GET /otc/coin/{mint} gives every coin's market cap in dollars whatever it trades against, so a form can start from it.

What a market offer guarantees the seller. A fill pays the higher of the market price at that moment and the offer's reference price less 3%, and never less than the offer's floor. The reference is set at listing, rises at once with the market, and comes down at most 3% a minute through POST /otc/refresh, which anyone can send; Payday runs a crank that sends it every minute, and an alarm fires when the crank stalls. The program refuses a market fill sent with a swap or any other program's instruction, so a price cannot be pushed inside the same transaction, but a price pushed in the transaction just before can still fill an offer about 3% under the market. Large amounts are safer as market-cap offers.

What a buyer pays. The buyer's limit (maxPay) is the live market price plus 1%. When the reference sits above the market, the fill is refused before signing (ABOVE_MARKET) rather than charged. If the price moves past the limit before the transaction lands, nothing moves; the site builds the fill again and asks the buyer to confirm the new amount.

Which coins

Any pump.fun coin, Payday's or not: the program checks the coin's pump.fun bonding curve on chain, and refuses coins that can still be minted or frozen and Token-2022 coins with features pump.fun coins do not have. GET /otc/coin/{mint} gives the same answer before anyone signs (problem), with the name, picture, market price and liquidity, and ?wallet= says how much a wallet holds. A wallet that does not hold enough cannot list.

Payouts while listed

Coins in the locker don't earn Cash Payback or basket payouts while they're locked.

Codes to branch on

CodeMeaning
NOT_HELDThe wallet does not hold the coin, or holds less than the amount
NOT_ALLOWEDNot a pump.fun coin, or a coin the locker refuses
SOL_ONLYA price in anything but SOL
QUOTE_MISMATCHA market offer for a coin that does not trade against SOL: use a market cap
MARKET_OFFMarket-price offers are switched off for now; market-cap offers still work
ABOVE_MARKETThe offer's reference sits over the market right now; it comes down about 3% a minute
NO_FILL_BELOW_FLOORThe market is under the seller's floor
BAD_EXPIRY, BAD_OFFSETExpiry outside 10 minutes to 90 days; offset outside -5% to +5%
NOT_BUYER, NOT_SELLERA private offer for another wallet; only the seller can cancel
NO_FILL_BELOW_MIN, NO_FILL_TAKE_RESTUnder the smallest fill, or would leave less than it behind
NO_FILL_PRICE_MOVEDThe price changed in this block: build the fill again in a moment
USD_OFFDollar market cap offers are switched off on this network
SIMULATION_FAILED with errCode 6033 or 6034SOL's price is out of date or moving too fast: try the fill again in a moment

GET /otc/history/{wallet} lists a wallet's buys and sales, newest first, with what was paid, the fee, what the seller received and the price as a market cap. Every offer has a link that opens it on Payday: https://dev.payday.direct/otc/o/{listing}, or https://dev.payday.direct/otc/d/{listing} for a private offer.

PAUSEDNew offers and fills are paused; cancel and return still work