Skip to content

Instantly share code, notes, and snippets.

@paulofreitas
Last active April 2, 2024 21:49
Show Gist options
  • Save paulofreitas/da6b325fc94b2e1c10150393c4f8e8a5 to your computer and use it in GitHub Desktop.
Save paulofreitas/da6b325fc94b2e1c10150393c4f8e8a5 to your computer and use it in GitHub Desktop.
tip.cc API v0.1.1 proposal: `/api/v0/currencies/fiats` should use `def-1` schema for `code`and `/api/v0/currencies/rates` should use an `oneOf` struct with `def-0` and `def-1` schemas for `code`
{
"openapi": "3.0.0",
"info": {
"title": "tip.cc API",
"description": "API for tip.cc",
"version": "0.1.1"
},
"components": {
"securitySchemes": {
"apiKey": {
"type": "http",
"description": "JWT API key. Retrieved from the auth endpoints for regular users.",
"scheme": "bearer",
"bearerFormat": "JWT"
},
"botAPIKey": {
"type": "http",
"description": "JWT API key. Available on request.",
"scheme": "bearer",
"bearerFormat": "JWT"
}
},
"schemas": {
"def-0": {
"type": "string",
"description": "Cryptocurrency code.",
"enum": [
"1337",
"1MT",
"2022M",
"2GT",
"4BIDN",
"5HRIMP",
"AAVE",
"ABST",
"ACX",
"ADA",
"ADDY",
"AFT",
"AGC",
"AIN",
"ALCX",
"ALEX",
"ALIAS",
"ALXO",
"ANC",
"ANTS",
"ARC",
"ARRR",
"ART",
"ARTONLINE",
"ASTRO",
"ASX",
"ATK",
"ATS",
"AUDIO",
"AUTUMN",
"AVAX",
"AVGL",
"B0T",
"B20",
"BAC",
"BACON",
"BADGER",
"BAEPAY",
"BAL",
"BAN",
"BANANA",
"BAT",
"BCH",
"BEAR",
"BELUGA",
"BERT",
"BFG",
"BFJB",
"BID",
"BIFI",
"BIRB",
"BITT",
"BLK",
"BLOODYAXE",
"BLURT",
"BMON",
"BNB",
"BNJ",
"BNT",
"BOBA",
"BOMB",
"BONES",
"BOOM",
"BOOMC",
"BPC",
"BRIGHT",
"BRIX",
"BRX",
"BSCBACON",
"BSGG",
"BSV",
"BTC",
"BTCZ",
"BTG",
"BTLLR",
"BTQ",
"BTTOLD",
"BUGZ",
"BUSD",
"BUZZ",
"BXMI",
"CAKE",
"CAMO",
"CANNACOIN",
"CAPT",
"CARD",
"CASS",
"CBL",
"CCC",
"CDS",
"CDY",
"CFXQ",
"CHEDR",
"CHEER",
"CHERRY",
"CHIZ",
"CHL",
"CHP",
"CIC",
"CLAM",
"CLOUDT",
"CMK",
"CNG",
"CNJ",
"COCKTAIL",
"COIN",
"COMBO",
"COMFY",
"COMP",
"COTK",
"CREDS",
"CUMMIES",
"CURIO",
"CVD",
"CVN",
"DAI",
"DANK",
"DARA",
"DASH",
"DATA",
"dbl",
"DEEZNUTS",
"DEPO",
"DESK",
"DGB",
"DHT",
"DIAH",
"DIAHv1",
"DIVI",
"DNT",
"DODO",
"DOG",
"DOGE",
"DOOM",
"DPX",
"DRC",
"DSD",
"DSGN",
"DTC",
"DTR",
"DTUBE",
"DUDE",
"DUMA",
"DVASH",
"DVT",
"DXLM",
"DYDX",
"ECHO",
"ECLIPSE",
"EGG",
"EGT",
"EHB",
"ENH",
"EOS",
"ESD",
"ETC",
"ETH-OP",
"ETH",
"ETN",
"EUROC",
"EUROst",
"EUT",
"EVRT",
"EXPEX",
"EXRD",
"FAMILY",
"FARM",
"FEET",
"FGL",
"FIELD",
"FINA",
"FIRST",
"FISH",
"FISHTANK",
"FLAME",
"FLR",
"FLUX",
"FLVR",
"FLX",
"FNDZ",
"FORCER",
"FOX",
"FRONT",
"FT",
"GAME",
"GATS",
"GBYTE",
"GCASH",
"GEN",
"GERT",
"GHST",
"GIN",
"GINI",
"GLXY",
"GOAT",
"GORE",
"GORN",
"GOU",
"GPL",
"GRAIN",
"GREEN",
"GTT",
"GUILD",
"GYSR",
"H4G",
"HALO",
"HAMS",
"HBD",
"HC",
"HERO",
"HEX",
"HGH",
"HIVE",
"HMMM",
"HND",
"HNY",
"HOGE",
"HONEYD",
"HOWL",
"HPS",
"HUE",
"HUSH",
"HYP",
"ICAP",
"ICE",
"ICHI",
"IGNT",
"IHF",
"ILV",
"INFO",
"INI",
"INKZ",
"JBX",
"JOE",
"JPX",
"JRT",
"JUP",
"KAMA",
"KANDA",
"KANGG",
"KBN",
"KITTY",
"KMD",
"KRT",
"LADZ",
"LBC",
"LBY",
"LDOGE",
"LIFE",
"LINK",
"LIT",
"LKG",
"LNR",
"LOOT",
"LORDS",
"LOTTO",
"LTC",
"LUNC",
"LUX",
"LVL",
"LYCN",
"LYRA",
"MAGICK",
"MARS",
"MARTIA",
"MARTK",
"MASQ",
"MATIC",
"MBC",
"MEAD",
"MEM",
"MEOW",
"MEYERS",
"MFT",
"MIMATIC",
"MIR",
"MIST",
"MM",
"MNFT",
"MNFTCOIN",
"MNT",
"MONSTA",
"MOONER",
"MOONIE",
"MORK",
"MPH",
"MRP",
"MSG",
"MTA",
"MTL",
"NANO",
"NBMACT",
"NBMCON",
"NBMFUS",
"NBMMIN",
"NCT",
"NDX",
"NEOXAG",
"NESS",
"NFD",
"NFTART",
"NFTL",
"NFTV",
"NFXCOIN",
"NIM",
"NINKY",
"NITRO",
"NST",
"NUME",
"OATS",
"OCEAN",
"OHM",
"OIL",
"OK",
"OKLG",
"ONI",
"OP",
"OPTIDOGE",
"OSEAN",
"PAGE",
"PAINT",
"PANTHER",
"PATH",
"PAW",
"PAWS",
"PDD",
"PEACH",
"PENCIL",
"PEPE",
"PERP",
"PEVRT",
"PGEN",
"PHTK",
"PICA",
"PICKLE",
"PINS",
"PIVX",
"PIXA",
"PIXEL",
"PIZZA",
"PKR",
"PLAY",
"PLU",
"PNG",
"POTS",
"POW",
"PPC",
"PPO",
"PPY",
"PRBS",
"PRINC",
"PRTN",
"PSYOP",
"PURR",
"PUSSY",
"PYGOZ",
"PYO",
"PYRO",
"QI",
"R0OK",
"RADS",
"RAI",
"RARE",
"RDD",
"RDPX",
"REFLECTO",
"REP",
"RHINE",
"RHT",
"RIC",
"RIOT",
"RNG",
"RODZ",
"ROY",
"RUG",
"RUSH",
"RVL",
"RVLX",
"RVN",
"RWASTE",
"RYO",
"SACT",
"SAFE",
"SAN",
"SAND",
"SATOX",
"SBD",
"SCB",
"SCCN",
"SCOTT",
"SCPT",
"SCSG",
"SDOLLAR",
"SEED",
"SFM",
"SFUND",
"SHBAR",
"SHELL",
"SHERPA",
"SHIB",
"SHING",
"SHINY",
"SHO",
"SHOCK",
"SHROOM",
"SHX",
"SIGNAL",
"SIN",
"SISTA",
"SKILL",
"SKMT",
"SKR",
"SKULL",
"SLING",
"SMBElon",
"SMTF",
"SNOB",
"SNOW",
"SNV",
"SNX",
"SOFRESH",
"SOL",
"SOS",
"SPOTX",
"SPRING",
"SSV",
"ST",
"STAK",
"STAKE",
"STARDUST",
"STATICLP",
"STEADY",
"STEEM",
"STG",
"STRIP",
"STRN",
"SUMMER",
"SUSD",
"SUSHI",
"SWAGG",
"SWTH",
"TACO",
"TBB",
"TBS",
"THALES",
"THANKS",
"THC",
"THOR",
"TIC",
"TKL",
"TKN",
"TLM",
"TLOS",
"TMDC",
"TOCIUM",
"TRADE",
"TRC",
"TRDM",
"TRIPS",
"TRS",
"TRU",
"TRX",
"TST",
"TT",
"TVK",
"UBI",
"UCD",
"UMA",
"UNI",
"UNIM",
"USDC",
"USDT",
"USDe",
"USR",
"UST",
"VAFFA",
"VAFFAOPT",
"VAL",
"VALUE",
"VAULT",
"VAULTX",
"VEXT",
"VGC",
"VIBE",
"VINU",
"VOLT",
"VOXEL",
"VRSC",
"VTC",
"WAIFU",
"WARP",
"WARRR",
"WATER",
"WAXP",
"WCK",
"WDVT",
"WEGG",
"WGM",
"WHALE",
"WHSKI",
"WIN",
"WINTER",
"WIPC",
"WITCHFIRE",
"WMARTK",
"WMUE",
"WNYC",
"WOO",
"WOW",
"WRLD",
"WSAFE",
"WURST",
"WXT",
"X7R",
"XAUT",
"XDOGE",
"XFT",
"XHUMAN",
"XIO",
"XJP",
"XLA",
"XLM",
"XMR",
"XMT",
"XPR",
"XRP",
"XTK",
"XTZ",
"XVG",
"XYO",
"YAM",
"YAX",
"YAXIS",
"YGG",
"YUI",
"YUM",
"YUMI",
"ZAPH",
"ZDEX",
"ZEC",
"ZEN",
"ZER",
"ZINGOT",
"ZOMB",
"ZRX",
"ZUG",
"ZYN",
"aCDS",
"aUST",
"alETH",
"alUSD",
"arbETH",
"b1MT",
"bBITT",
"bKIT",
"bLOTTO",
"bLUNA",
"bPUSSY",
"bTBB",
"bTR3B",
"bobaETH",
"brkl",
"cSWIX",
"gvVALUE-B",
"jEUR",
"oneFOX",
"oneMPH",
"opACX",
"opSNX",
"opTHALES",
"opSUSD",
"pAPW",
"pARKES",
"pBANANA",
"pCDS",
"pMASQ",
"pMEM",
"pNFD",
"pPAINT",
"pSTAK",
"pSWD",
"pTREAT",
"pUNT",
"pZUG",
"prkl",
"rkl",
"sILV",
"sILV2",
"suINT",
"uDAO",
"uINT",
"uTVL-0621",
"vBSWAP",
"xDAI",
"xFOX",
"xGIV",
"xICHI",
"xNANA"
],
"title": "cryptocurrency"
},
"def-1": {
"type": "string",
"description": "Fiat currency code.",
"enum": [
"ARS",
"AUD",
"IDR",
"CAD",
"EUR",
"GBP",
"INR",
"JPY",
"NZD",
"PHP",
"PLN",
"USD"
],
"title": "fiatcurrency"
},
"def-2": {
"type": "string",
"description": "Crypto or fiat currency code.",
"enum": [
"1337",
"1MT",
"2022M",
"2GT",
"4BIDN",
"5HRIMP",
"AAVE",
"ABST",
"ACX",
"ADA",
"ADDY",
"AFT",
"AGC",
"AIN",
"ALCX",
"ALEX",
"ALIAS",
"ALXO",
"ANC",
"ANTS",
"ARC",
"ARRR",
"ART",
"ARTONLINE",
"ASTRO",
"ASX",
"ATK",
"ATS",
"AUDIO",
"AUTUMN",
"AVAX",
"AVGL",
"B0T",
"B20",
"BAC",
"BACON",
"BADGER",
"BAEPAY",
"BAL",
"BAN",
"BANANA",
"BAT",
"BCH",
"BEAR",
"BELUGA",
"BERT",
"BFG",
"BFJB",
"BID",
"BIFI",
"BIRB",
"BITT",
"BLK",
"BLOODYAXE",
"BLURT",
"BMON",
"BNB",
"BNJ",
"BNT",
"BOBA",
"BOMB",
"BONES",
"BOOM",
"BOOMC",
"BPC",
"BRIGHT",
"BRIX",
"BRX",
"BSCBACON",
"BSGG",
"BSV",
"BTC",
"BTCZ",
"BTG",
"BTLLR",
"BTQ",
"BTTOLD",
"BUGZ",
"BUSD",
"BUZZ",
"BXMI",
"CAKE",
"CAMO",
"CANNACOIN",
"CAPT",
"CARD",
"CASS",
"CBL",
"CCC",
"CDS",
"CDY",
"CFXQ",
"CHEDR",
"CHEER",
"CHERRY",
"CHIZ",
"CHL",
"CHP",
"CIC",
"CLAM",
"CLOUDT",
"CMK",
"CNG",
"CNJ",
"COCKTAIL",
"COIN",
"COMBO",
"COMFY",
"COMP",
"COTK",
"CREDS",
"CUMMIES",
"CURIO",
"CVD",
"CVN",
"DAI",
"DANK",
"DARA",
"DASH",
"DATA",
"dbl",
"DEEZNUTS",
"DEPO",
"DESK",
"DGB",
"DHT",
"DIAH",
"DIAHv1",
"DIVI",
"DNT",
"DODO",
"DOG",
"DOGE",
"DOOM",
"DPX",
"DRC",
"DSD",
"DSGN",
"DTC",
"DTR",
"DTUBE",
"DUDE",
"DUMA",
"DVASH",
"DVT",
"DXLM",
"DYDX",
"ECHO",
"ECLIPSE",
"EGG",
"EGT",
"EHB",
"ENH",
"EOS",
"ESD",
"ETC",
"ETH-OP",
"ETH",
"ETN",
"EUROC",
"EUROst",
"EUT",
"EVRT",
"EXPEX",
"EXRD",
"FAMILY",
"FARM",
"FEET",
"FGL",
"FIELD",
"FINA",
"FIRST",
"FISH",
"FISHTANK",
"FLAME",
"FLR",
"FLUX",
"FLVR",
"FLX",
"FNDZ",
"FORCER",
"FOX",
"FRONT",
"FT",
"GAME",
"GATS",
"GBYTE",
"GCASH",
"GEN",
"GERT",
"GHST",
"GIN",
"GINI",
"GLXY",
"GOAT",
"GORE",
"GORN",
"GOU",
"GPL",
"GRAIN",
"GREEN",
"GTT",
"GUILD",
"GYSR",
"H4G",
"HALO",
"HAMS",
"HBD",
"HC",
"HERO",
"HEX",
"HGH",
"HIVE",
"HMMM",
"HND",
"HNY",
"HOGE",
"HONEYD",
"HOWL",
"HPS",
"HUE",
"HUSH",
"HYP",
"ICAP",
"ICE",
"ICHI",
"IGNT",
"IHF",
"ILV",
"INFO",
"INI",
"INKZ",
"JBX",
"JOE",
"JPX",
"JRT",
"JUP",
"KAMA",
"KANDA",
"KANGG",
"KBN",
"KITTY",
"KMD",
"KRT",
"LADZ",
"LBC",
"LBY",
"LDOGE",
"LIFE",
"LINK",
"LIT",
"LKG",
"LNR",
"LOOT",
"LORDS",
"LOTTO",
"LTC",
"LUNC",
"LUX",
"LVL",
"LYCN",
"LYRA",
"MAGICK",
"MARS",
"MARTIA",
"MARTK",
"MASQ",
"MATIC",
"MBC",
"MEAD",
"MEM",
"MEOW",
"MEYERS",
"MFT",
"MIMATIC",
"MIR",
"MIST",
"MM",
"MNFT",
"MNFTCOIN",
"MNT",
"MONSTA",
"MOONER",
"MOONIE",
"MORK",
"MPH",
"MRP",
"MSG",
"MTA",
"MTL",
"NANO",
"NBMACT",
"NBMCON",
"NBMFUS",
"NBMMIN",
"NCT",
"NDX",
"NEOXAG",
"NESS",
"NFD",
"NFTART",
"NFTL",
"NFTV",
"NFXCOIN",
"NIM",
"NINKY",
"NITRO",
"NST",
"NUME",
"OATS",
"OCEAN",
"OHM",
"OIL",
"OK",
"OKLG",
"ONI",
"OP",
"OPTIDOGE",
"OSEAN",
"PAGE",
"PAINT",
"PANTHER",
"PATH",
"PAW",
"PAWS",
"PDD",
"PEACH",
"PENCIL",
"PEPE",
"PERP",
"PEVRT",
"PGEN",
"PHTK",
"PICA",
"PICKLE",
"PINS",
"PIVX",
"PIXA",
"PIXEL",
"PIZZA",
"PKR",
"PLAY",
"PLU",
"PNG",
"POTS",
"POW",
"PPC",
"PPO",
"PPY",
"PRBS",
"PRINC",
"PRTN",
"PSYOP",
"PURR",
"PUSSY",
"PYGOZ",
"PYO",
"PYRO",
"QI",
"R0OK",
"RADS",
"RAI",
"RARE",
"RDD",
"RDPX",
"REFLECTO",
"REP",
"RHINE",
"RHT",
"RIC",
"RIOT",
"RNG",
"RODZ",
"ROY",
"RUG",
"RUSH",
"RVL",
"RVLX",
"RVN",
"RWASTE",
"RYO",
"SACT",
"SAFE",
"SAN",
"SAND",
"SATOX",
"SBD",
"SCB",
"SCCN",
"SCOTT",
"SCPT",
"SCSG",
"SDOLLAR",
"SEED",
"SFM",
"SFUND",
"SHBAR",
"SHELL",
"SHERPA",
"SHIB",
"SHING",
"SHINY",
"SHO",
"SHOCK",
"SHROOM",
"SHX",
"SIGNAL",
"SIN",
"SISTA",
"SKILL",
"SKMT",
"SKR",
"SKULL",
"SLING",
"SMBElon",
"SMTF",
"SNOB",
"SNOW",
"SNV",
"SNX",
"SOFRESH",
"SOL",
"SOS",
"SPOTX",
"SPRING",
"SSV",
"ST",
"STAK",
"STAKE",
"STARDUST",
"STATICLP",
"STEADY",
"STEEM",
"STG",
"STRIP",
"STRN",
"SUMMER",
"SUSD",
"SUSHI",
"SWAGG",
"SWTH",
"TACO",
"TBB",
"TBS",
"THALES",
"THANKS",
"THC",
"THOR",
"TIC",
"TKL",
"TKN",
"TLM",
"TLOS",
"TMDC",
"TOCIUM",
"TRADE",
"TRC",
"TRDM",
"TRIPS",
"TRS",
"TRU",
"TRX",
"TST",
"TT",
"TVK",
"UBI",
"UCD",
"UMA",
"UNI",
"UNIM",
"USDC",
"USDT",
"USDe",
"USR",
"UST",
"VAFFA",
"VAFFAOPT",
"VAL",
"VALUE",
"VAULT",
"VAULTX",
"VEXT",
"VGC",
"VIBE",
"VINU",
"VOLT",
"VOXEL",
"VRSC",
"VTC",
"WAIFU",
"WARP",
"WARRR",
"WATER",
"WAXP",
"WCK",
"WDVT",
"WEGG",
"WGM",
"WHALE",
"WHSKI",
"WIN",
"WINTER",
"WIPC",
"WITCHFIRE",
"WMARTK",
"WMUE",
"WNYC",
"WOO",
"WOW",
"WRLD",
"WSAFE",
"WURST",
"WXT",
"X7R",
"XAUT",
"XDOGE",
"XFT",
"XHUMAN",
"XIO",
"XJP",
"XLA",
"XLM",
"XMR",
"XMT",
"XPR",
"XRP",
"XTK",
"XTZ",
"XVG",
"XYO",
"YAM",
"YAX",
"YAXIS",
"YGG",
"YUI",
"YUM",
"YUMI",
"ZAPH",
"ZDEX",
"ZEC",
"ZEN",
"ZER",
"ZINGOT",
"ZOMB",
"ZRX",
"ZUG",
"ZYN",
"aCDS",
"aUST",
"alETH",
"alUSD",
"arbETH",
"b1MT",
"bBITT",
"bKIT",
"bLOTTO",
"bLUNA",
"bPUSSY",
"bTBB",
"bTR3B",
"bobaETH",
"brkl",
"cSWIX",
"gvVALUE-B",
"jEUR",
"oneFOX",
"oneMPH",
"opACX",
"opSNX",
"opTHALES",
"opSUSD",
"pAPW",
"pARKES",
"pBANANA",
"pCDS",
"pMASQ",
"pMEM",
"pNFD",
"pPAINT",
"pSTAK",
"pSWD",
"pTREAT",
"pUNT",
"pZUG",
"prkl",
"rkl",
"sILV",
"sILV2",
"suINT",
"uDAO",
"uINT",
"uTVL-0621",
"vBSWAP",
"xDAI",
"xFOX",
"xGIV",
"xICHI",
"xNANA",
"ARS",
"AUD",
"IDR",
"CAD",
"EUR",
"GBP",
"INR",
"JPY",
"NZD",
"PHP",
"PLN",
"USD"
],
"title": "currency"
},
"def-3": {
"type": "object",
"properties": {
"value": {
"type": "string",
"pattern": "^[0-9]*$",
"description": "Currency value in atomic units."
},
"currency": {
"$ref": "#/components/schemas/def-2"
}
},
"required": [
"value",
"currency"
],
"additionalProperties": false,
"nullable": true,
"title": "monetary"
},
"def-4": {
"type": "object",
"properties": {
"value": {
"type": "string",
"pattern": "^[1-9][0-9]*$",
"description": "Currency value in atomic units."
},
"currency": {
"$ref": "#/components/schemas/def-0"
}
},
"required": [
"value",
"currency"
],
"additionalProperties": false,
"nullable": false,
"title": "coin"
},
"def-5": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"direction": {
"type": "string",
"enum": [
"incoming",
"outgoing"
]
},
"type": {
"type": "string",
"enum": [
"tip",
"deposit",
"withdrawal"
]
},
"amount": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Transaction amount without fees."
},
"fee": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"type": "object",
"nullable": true,
"description": "Deposit/withdrawal fee. `null` for tips."
},
"usd_value": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"type": "object",
"nullable": true,
"description": "Estimated USD value at the time of the transaction."
},
"service": {
"$ref": "#/components/schemas/def-6"
},
"chat_id": {
"type": "string",
"nullable": true,
"description": "Discord guild ID where the transaction was initiated. Tips only."
},
"subchat_id": {
"type": "string",
"nullable": true,
"description": "Discord channel ID where the transaction was initiated. Tips only."
},
"sender": {
"oneOf": [
{
"$ref": "#/components/schemas/def-7"
},
{
"type": "null",
"description": "No sender, deposits only."
}
]
},
"recipient": {
"oneOf": [
{
"$ref": "#/components/schemas/def-7"
},
{
"type": "object",
"description": "Withdrawal destination address and extra. Withdrawals only.",
"properties": {
"address": {
"type": "string"
},
"extra": {
"type": "string",
"nullable": true
}
},
"required": [
"address"
]
}
]
},
"created": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"type",
"direction",
"amount",
"fee",
"usd_value",
"service",
"chat_id",
"subchat_id",
"sender",
"recipient",
"created"
],
"title": "transaction"
},
"def-6": {
"type": "string",
"description": "Platform. `discord` only for now.",
"enum": [
"discord"
],
"default": "discord",
"title": "service"
},
"def-7": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "Discord user ID."
},
"username": {
"type": "string",
"nullable": true,
"description": "Discord username."
},
"avatar_url": {
"type": "string",
"nullable": true,
"description": "Discord avatar URL"
},
"service": {
"$ref": "#/components/schemas/def-6"
}
},
"required": [
"identifier",
"service"
],
"additionalProperties": false,
"title": "connection"
}
}
},
"paths": {
"/api/v0/currencies": {
"get": {
"summary": "List of all supported cryptocurrencies.",
"tags": [
"currencies"
],
"description": "Lists all supported cryptocurrencies with formatting hints",
"deprecated": true,
"security": [],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"currencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/def-0"
},
"name": {
"type": "string"
},
"master": {
"allOf": [
{
"$ref": "#/components/schemas/def-0"
}
],
"type": "string",
"nullable": true,
"description": "Network's native asset, if the currency is a token or asset."
},
"color": {
"type": "string",
"description": "HEX-encoded crypto color."
},
"icon": {
"type": "string",
"description": "CDN url of the cryptocurrency icon, PNG."
},
"explorer": {
"type": "string",
"description": "URL prefix to a transaction view page of the appropriate block explorer."
},
"feeUnit": {
"type": "string",
"nullable": true,
"description": "Preferred unit for displaying transaction fees (e.g. `satoshi`, `gwei`)."
},
"format": {
"type": "object",
"additionalProperties": true,
"description": "Formatting options, additional units.",
"properties": {
"scale": {
"type": "integer",
"description": "Amount of decimals this currency has. Scale of `8` means 1 coin has 100,000,000 atomic units (like Bitcoin has satoshis)"
},
"units": {
"type": "array",
"items": {
"type": "object",
"properties": {
"singular": {
"type": "string",
"description": "Singular form of the unit."
},
"plural": {
"type": "string",
"nullable": true,
"description": "Plural form of the unit, use singular if not provided."
},
"prefix": {
"type": "string",
"nullable": true,
"description": "Prefix for formatted values. Do not use with singular/plural."
},
"suffix": {
"type": "string",
"nullable": true,
"description": "Suffix for formatted values. Do not use with singular/plural."
},
"scale": {
"type": "integer",
"description": "Amount of decimals this unit has."
},
"minDecimals": {
"type": "integer",
"nullable": true,
"description": "Format with at least this many decimals."
},
"optionalDecimals": {
"type": "integer",
"nullable": true,
"description": "Format this many extra decimals for each significant set of decimals."
},
"min": {
"type": "integer",
"nullable": true,
"description": "Choose this unit when at least this many atomic units are being displayed."
}
},
"additionalProperties": false
}
}
}
},
"options": {
"type": "object",
"description": "Crypto's quirks and features",
"properties": {
"extras": {
"type": "string",
"nullable": true,
"description": "Name of extra field, if available, e.g. memo, tag,."
},
"accounts": {
"type": "boolean",
"nullable": true,
"description": "Whether to refer to addresses as accounts or as addresses"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/api/v0/currencies/cryptocurrencies": {
"get": {
"summary": "List of all supported cryptocurrencies.",
"tags": [
"currencies"
],
"description": "Lists all supported cryptocurrencies with formatting hints",
"security": [],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"cryptocurrencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/def-0"
},
"name": {
"type": "string"
},
"master": {
"allOf": [
{
"$ref": "#/components/schemas/def-0"
}
],
"type": "string",
"nullable": true,
"description": "Network's native asset, if the currency is a token or asset."
},
"color": {
"type": "string",
"description": "HEX-encoded crypto color."
},
"icon": {
"type": "string",
"description": "CDN url of the cryptocurrency icon, PNG."
},
"explorer": {
"type": "string",
"description": "URL prefix to a transaction view page of the appropriate block explorer."
},
"feeUnit": {
"type": "string",
"nullable": true,
"description": "Preferred unit for displaying transaction fees (e.g. `satoshi`, `gwei`)."
},
"format": {
"type": "object",
"additionalProperties": true,
"description": "Formatting options, additional units.",
"properties": {
"scale": {
"type": "integer",
"description": "Amount of decimals this currency has. Scale of `8` means 1 coin has 100,000,000 atomic units (like Bitcoin has satoshis)"
},
"units": {
"type": "array",
"items": {
"type": "object",
"properties": {
"singular": {
"type": "string",
"description": "Singular form of the unit."
},
"plural": {
"type": "string",
"nullable": true,
"description": "Plural form of the unit, use singular if not provided."
},
"prefix": {
"type": "string",
"nullable": true,
"description": "Prefix for formatted values. Do not use with singular/plural."
},
"suffix": {
"type": "string",
"nullable": true,
"description": "Suffix for formatted values. Do not use with singular/plural."
},
"scale": {
"type": "integer",
"description": "Amount of decimals this unit has."
},
"minDecimals": {
"type": "integer",
"nullable": true,
"description": "Format with at least this many decimals."
},
"optionalDecimals": {
"type": "integer",
"nullable": true,
"description": "Format this many extra decimals for each significant set of decimals."
},
"min": {
"type": "integer",
"nullable": true,
"description": "Choose this unit when at least this many atomic units are being displayed."
}
},
"additionalProperties": false
}
}
}
},
"options": {
"type": "object",
"description": "Crypto's quirks and features",
"properties": {
"extras": {
"type": "string",
"nullable": true,
"description": "Name of extra field, if available, e.g. memo, tag,."
},
"accounts": {
"type": "boolean",
"nullable": true,
"description": "Whether to refer to addresses as accounts or as addresses"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/api/v0/currencies/fiats": {
"get": {
"summary": "List of all supported fiat currencies.",
"tags": [
"currencies"
],
"security": [],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"fiats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/def-1"
},
"name": {
"type": "string"
},
"format": {
"type": "object",
"additionalProperties": true,
"description": "Formatting options, additional units.",
"properties": {
"scale": {
"type": "integer",
"description": "Amount of decimals this currency has. All fiats have scale of 4, meaning 10000 atomic units is 1 USD or whatever."
},
"units": {
"type": "array",
"items": {
"type": "object",
"properties": {
"singular": {
"type": "string",
"description": "Singular form of the unit."
},
"plural": {
"type": "string",
"nullable": true,
"description": "Plural form of the unit, use singular if not provided."
},
"prefix": {
"type": "string",
"nullable": true,
"description": "Prefix for formatted values. Do not use with singular/plural."
},
"suffix": {
"type": "string",
"nullable": true,
"description": "Suffix for formatted values. Do not use with singular/plural."
},
"scale": {
"type": "integer",
"description": "Amount of decimals this unit has."
},
"minDecimals": {
"type": "integer",
"nullable": true,
"description": "Format with at least this many decimals."
},
"optionalDecimals": {
"type": "integer",
"nullable": true,
"description": "Format this many extra decimals for each significant set of decimals."
},
"min": {
"type": "integer",
"nullable": true,
"description": "Choose this unit when at least this many atomic units are being displayed."
}
},
"additionalProperties": false
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/api/v0/currencies/rates": {
"get": {
"summary": "Exchange rates for all supported currencies.",
"tags": [
"currencies"
],
"description": "Lists USD values for every supported currency.",
"security": [],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"oneOf": [
{
"$ref": "#/components/schemas/def-0"
},
{
"$ref": "#/components/schemas/def-1"
}
]
},
"name": {
"type": "string"
},
"usd_value": {
"$ref": "#/components/schemas/def-3"
}
}
}
}
}
}
}
}
}
}
}
},
"/api/v0/user": {
"get": {
"summary": "Gets info about the logged in user.",
"tags": [
"user",
"bots"
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"type": "object",
"description": "User information",
"properties": {
"id": {
"type": "string",
"description": "Internal user ID.",
"format": "uuid"
},
"bot": {
"type": "boolean",
"description": "Is the logged in user a bot."
},
"created": {
"type": "string",
"description": "Date and time of account creation.",
"format": "date-time"
}
},
"additionalProperties": false
}
}
}
}
}
}
}
}
},
"/api/v0/user/connections": {
"get": {
"summary": "Returns all platforms connected to this user.",
"tags": [
"user",
"bots",
"connections"
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"connections": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/def-7"
}
],
"description": "Platform connection details.",
"additionalProperties": false,
"type": "object"
}
}
}
}
}
}
}
}
}
},
"/api/v0/account/wallets": {
"get": {
"summary": "Returns all balances.",
"tags": [
"user",
"wallet"
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"wallets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/def-0"
},
"name": {
"type": "string"
},
"balance": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Available balance for this currency."
},
"usd_value": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Estimated USD value of the balance.",
"nullable": true
}
}
}
}
}
}
}
}
}
}
}
},
"/api/v0/account/wallets/{code}": {
"get": {
"summary": "Balance of chosen wallet.",
"tags": [
"user",
"wallet"
],
"parameters": [
{
"schema": {
"$ref": "#/components/schemas/def-0"
},
"in": "path",
"name": "code",
"required": true
}
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/def-0"
},
"name": {
"type": "string"
},
"balance": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Available balance for this currency."
},
"usd_value": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Estimated USD value of the balance.",
"nullable": true
}
}
}
}
}
}
}
}
},
"/api/v0/account/wallets/{code}/addresses": {
"get": {
"summary": "Gets deposit address or addresses for selected currency.",
"tags": [
"user",
"wallet",
"deposits"
],
"description": "Get address or addresses for the selected currency, along with fee and confirmations info.",
"parameters": [
{
"schema": {
"$ref": "#/components/schemas/def-0"
},
"in": "path",
"name": "code",
"required": true
}
],
"security": [
{
"apiKey": []
}
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/def-0"
},
"name": {
"type": "string"
},
"master": {
"type": "string",
"nullable": true,
"description": "Master cryptocurrency's code. `ETH` for ERC-20 tokens, etc."
},
"addresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"nullable": false,
"description": "Deposit address"
},
"extra": {
"type": "string",
"nullable": true,
"description": "Deposit extra, e.g. a memo, a destination field, etc., where necessary."
},
"uri": {
"type": "string",
"description": "Deposit URI formatted for QR codes."
}
},
"required": [
"address"
]
},
"description": "List of deposit addresses"
},
"fee": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Deposit fee, estimated or fixed."
},
"fee_is_estimate": {
"type": "boolean",
"nullable": true,
"description": "Whether the fee is an estimate and can change mid-deposit or not."
},
"minimum_confirmations": {
"type": "integer",
"nullable": true,
"description": "Minimum confirmations for the deposit to get credited."
},
"minimum_confirmations_are_estimate": {
"type": "boolean",
"nullable": true,
"description": "Whether the minimum confirmation number is only an estimate"
}
}
}
}
}
},
"400": {
"description": "Wallet ran out of addresses to use for deposits. Temporary - we add new ones or recycle periodically.",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Wallet ran out of addresses to use for deposits. Temporary - we add new ones or recycle periodically.",
"properties": {
"error": {
"type": "string",
"enum": [
"ADDRESS_POOL_EMPTY"
]
}
}
}
}
}
},
"503": {
"description": "Wallet is offline (node down, maintenance, crash, plenty of reasons, none should happen).",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Wallet is offline (node down, maintenance, crash, plenty of reasons, none should happen).",
"properties": {
"error": {
"type": "string",
"enum": [
"WALLET_UNAVAILABLE"
]
}
}
}
}
}
}
}
}
},
"/api/v0/account/wallets/{code}/destination_info": {
"get": {
"summary": "Validates destination address and extra for selected currency.",
"tags": [
"user",
"wallet",
"withdrawals"
],
"description": "Returns error if incorrect, returns extra field requirements, if any.",
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "address",
"required": true
},
{
"schema": {
"type": "string",
"nullable": true
},
"in": "query",
"name": "extra",
"required": false
},
{
"schema": {
"$ref": "#/components/schemas/def-0"
},
"in": "path",
"name": "code",
"required": true
}
],
"security": [
{
"apiKey": []
}
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"description": "Whether the address is valid. If address and extra are provided, whether the address and extra are valid."
},
"extra": {
"type": "string",
"enum": [
"required",
"optional",
"none"
],
"default": "none",
"description": "Whether extra field is required for this address."
}
}
}
}
}
},
"400": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"description": "Invalid withdrawal address provided. Try `destination_info`.",
"properties": {
"valid": {
"type": "boolean"
},
"error": {
"type": "string",
"enum": [
"INVALID_ADDRESS"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Invalid withdrawal extra provided. Try `destination_info`.",
"properties": {
"valid": {
"type": "boolean"
},
"error": {
"type": "string",
"enum": [
"INVALID_EXTRA"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Attempting to send to the same wallet. Some cryptocurrencies don't allow that.",
"properties": {
"valid": {
"type": "boolean"
},
"error": {
"type": "string",
"enum": [
"SAME_DESTINATION"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Destination address/account does not exist on this blockchain and needs to be created. They require minimum balance. Some we can create, some we can't.",
"properties": {
"valid": {
"type": "boolean"
},
"error": {
"type": "string",
"enum": [
"NO_ACCOUNT"
]
},
"minimum": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Minimum balance to create a new account on this blockchain."
}
},
"required": [
"error",
"minimum"
],
"additionalProperties": false
}
]
}
}
}
},
"503": {
"description": "Wallet is offline (node down, maintenance, crash, plenty of reasons, none should happen).",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Wallet is offline (node down, maintenance, crash, plenty of reasons, none should happen).",
"properties": {
"error": {
"type": "string",
"enum": [
"WALLET_UNAVAILABLE"
]
}
}
}
}
}
}
}
}
},
"/api/v0/account/wallets/{code}/withdrawal": {
"post": {
"summary": "Creates a withdrawal requests.",
"tags": [
"user",
"wallet",
"withdrawals"
],
"description": "Creates a withdrawal request, returns fee estimations, and a withdrawal ID necessary to confirm/decline this withdrawal.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"address": {
"type": "string",
"description": "Destination address."
},
"extra": {
"type": "string",
"nullable": true,
"description": "Destination extra (e.g. a memo, a destination tag, etc.)"
},
"amount": {
"allOf": [
{
"$ref": "#/components/schemas/def-4"
}
],
"description": "Withdrawal amount."
}
},
"required": [
"address",
"amount"
],
"additionalProperties": false
}
}
},
"required": true
},
"parameters": [
{
"schema": {
"$ref": "#/components/schemas/def-0"
},
"in": "path",
"name": "code",
"required": true
}
],
"security": [
{
"apiKey": []
}
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Withdrawal request ID needed to send or cancel the requested withdrawal."
},
"fee": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Fee estimated for this withdrawal."
}
}
}
}
}
},
"400": {
"description": "Withdrawal failed.",
"content": {
"application/json": {
"schema": {
"description": "Withdrawal failed.",
"oneOf": [
{
"type": "object",
"description": "Invalid withdrawal address provided. Try `destination_info`.",
"properties": {
"error": {
"type": "string",
"enum": [
"INVALID_ADDRESS"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Invalid withdrawal extra provided. Try `destination_info`.",
"properties": {
"error": {
"type": "string",
"enum": [
"INVALID_EXTRA"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Attempting to send to the same wallet. Some cryptocurrencies don't allow that.",
"properties": {
"error": {
"type": "string",
"enum": [
"SAME_DESTINATION"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Network fees are too high to allow this withdrawal.",
"properties": {
"error": {
"type": "string",
"enum": [
"FEE_TOO_HIGH"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Funds temporarily unavailable. Monero locks fresh coins for some time.",
"properties": {
"error": {
"type": "string",
"enum": [
"WALLET_FUNDS_LOCKED"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Cannot afford this withdrawal + fee.",
"properties": {
"error": {
"type": "string",
"enum": [
"INSUFFICIENT_ACCOUNT_BALANCE"
]
},
"balance": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Available balance for this currency."
},
"fee": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Fee estimated for this withdrawal. You can retry the withdrawal and send balance minus fee to withdraw all (or most) funds."
}
},
"required": [
"error",
"balance"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Destination address/account does not exist on this blockchain and needs to be created. They require minimum balance. Some we can create, some we can't.",
"properties": {
"error": {
"type": "string",
"enum": [
"NO_ACCOUNT"
]
},
"minimum": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Minimum balance to create a new account on this blockchain."
}
},
"required": [
"error",
"minimum"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Withdrawal is too low.",
"properties": {
"error": {
"type": "string",
"enum": [
"TRANSFER_TOO_LOW"
]
},
"minimum": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Minimum withdrawal amount for this currency right now."
},
"fee": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Estimated fee for that withdrawal."
}
},
"required": [
"error",
"minimum",
"fee"
],
"additionalProperties": false
}
]
}
}
}
},
"503": {
"description": "Wallet is offline (node down, maintenance, crash, plenty of reasons, none should happen).",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Wallet is offline (node down, maintenance, crash, plenty of reasons, none should happen).",
"properties": {
"error": {
"type": "string",
"enum": [
"WALLET_UNAVAILABLE"
]
}
}
}
}
}
}
}
}
},
"/api/v0/account/wallets/{code}/withdrawal/{id}": {
"put": {
"summary": "Sends a withdrawal.",
"tags": [
"user",
"wallet",
"withdrawals"
],
"description": "Sends and broadcasts a previously requested withdrawal.",
"parameters": [
{
"schema": {
"$ref": "#/components/schemas/def-0"
},
"in": "path",
"name": "code",
"required": true
},
{
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"name": "id",
"required": true,
"description": "ID of the withdrawal request to send."
}
],
"security": [
{
"apiKey": []
}
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the withdrawal request to send."
},
"withdrawal": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Withdrawal ID."
},
"txid": {
"type": "string",
"description": "ID of sent transaction on the blockchain."
},
"amount": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Withdrawal amount."
},
"fee": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Withdrawal fee charged."
}
}
},
"balance": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Remaining balance."
}
}
}
}
}
},
"400": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
}
}
}
}
}
},
"delete": {
"summary": "Cancel a withdrawal.",
"tags": [
"user",
"wallet",
"withdrawals"
],
"description": "Cancels a previously requested withdrawal.",
"parameters": [
{
"schema": {
"$ref": "#/components/schemas/def-0"
},
"in": "path",
"name": "code",
"required": true
},
{
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"name": "id",
"required": true,
"description": "ID of the withdrawal request to cancel."
}
],
"security": [
{
"apiKey": []
}
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the canceled withdrawal request."
}
}
}
}
}
},
"400": {
"description": "Withdrawal request already timed out.",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Withdrawal request already timed out.",
"properties": {
"error": {
"type": "string",
"enum": [
"WITHDRAWAL_TIMED_OUT"
]
}
}
}
}
}
}
}
}
},
"/api/v0/account/transactions/{id}": {
"get": {
"summary": "Get a single tip, deposit or withdrawal by ID.",
"tags": [
"user",
"wallet",
"transactions",
"tips",
"deposits",
"withdrawals",
"bots"
],
"parameters": [
{
"schema": {
"type": "string",
"format": "uuid"
},
"in": "path",
"name": "id",
"required": true
}
],
"responses": {
"200": {
"description": "Requested transaction info.",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Requested transaction info.",
"properties": {
"transaction": {
"$ref": "#/components/schemas/def-5"
}
}
}
}
}
},
"404": {
"description": "Requested transaction not found or not belonging to this account.",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Requested transaction not found or not belonging to this account.",
"properties": {
"error": {
"type": "string",
"enum": [
"TRANSACTION_NOT_FOUND"
]
}
}
}
}
}
}
}
}
},
"/api/v0/account/transactions": {
"get": {
"summary": "List of user's tips, deposits and withdrawals.",
"tags": [
"user",
"wallet",
"transactions",
"tips",
"deposits",
"withdrawals",
"bots"
],
"parameters": [
{
"schema": {
"type": "string",
"format": "date-time",
"default": "2001-01-01T00:00:00+00:00"
},
"in": "query",
"name": "since",
"required": false
},
{
"schema": {
"type": "string",
"format": "date-time",
"default": "3001-01-01T00:00:00+00:00"
},
"in": "query",
"name": "until",
"required": false
},
{
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9223372036854776000,
"default": 0,
"not": {
"enum": [
null,
null
]
}
},
"in": "query",
"name": "offset",
"required": false,
"description": "Start pagination from this record. Use `offset` and `limit` for pagination."
},
{
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"default": 100,
"not": {
"enum": [
null,
null
]
}
},
"in": "query",
"name": "limit",
"required": false,
"description": "Get this many transactions. Use `offset` and `limit` for pagination."
},
{
"schema": {
"type": "array",
"default": [
"tip",
"deposit",
"withdrawal"
],
"items": {
"type": "string",
"enum": [
"tip",
"deposit",
"withdrawal"
]
},
"minItems": 1
},
"in": "query",
"name": "types",
"required": false
},
{
"schema": {
"type": "array",
"default": [
"incoming",
"outgoing"
],
"items": {
"type": "string",
"enum": [
"incoming",
"outgoing"
]
},
"minItems": 1
},
"in": "query",
"name": "directions",
"required": false,
"description": "Directions of transactions. Applies only to tips, deposits are always incoming and withdrawals are always outgoing."
},
{
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "desc"
},
"in": "query",
"name": "sort",
"required": false
},
{
"schema": {
"type": "string",
"nullable": true,
"default": null
},
"in": "query",
"name": "currency",
"required": false
}
],
"responses": {
"200": {
"description": "Requested transactions.",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Requested transactions.",
"properties": {
"transactions": {
"type": "array",
"description": "List of transactions.",
"items": {
"$ref": "#/components/schemas/def-5"
}
},
"total": {
"type": "integer",
"description": "Total transactions available for this query."
},
"more": {
"type": "boolean",
"description": "Is there more records to paginate."
}
}
}
}
}
}
}
}
},
"/api/v0/tips": {
"post": {
"summary": "Sends a tip.",
"tags": [
"bots",
"wallet",
"transactions",
"tips"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"service": {
"$ref": "#/components/schemas/def-6"
},
"recipient": {
"type": "string",
"description": "Platform identifier for tip recipient. Numerical user ID for Discord.",
"pattern": "^[0-9]{17,20}$"
},
"amount": {
"allOf": [
{
"$ref": "#/components/schemas/def-4"
}
],
"description": "Tip value to be sent."
}
},
"required": [
"service",
"recipient",
"amount"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"service": {
"$ref": "#/components/schemas/def-6"
},
"recipients": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9]{17,20}$"
},
"minItems": 1,
"maxItems": 10,
"description": "Platform identifiers for tip recipients. Numerical user ID for Discord. Tip will be split evenly between those users."
},
"amount": {
"allOf": [
{
"$ref": "#/components/schemas/def-4"
}
],
"description": "Tip value to be split evenly between recipients."
}
},
"required": [
"service",
"recipients",
"amount"
],
"additionalProperties": false
}
]
}
}
}
},
"security": [
{
"apiKey": []
}
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tips": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"recipient": {
"$ref": "#/components/schemas/def-7"
},
"amount": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Amount received by this recipient."
}
}
}
},
"total": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Total amount spent on this tip."
}
}
}
}
}
},
"400": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"description": "You don't have a connected account to use this platform.",
"properties": {
"error": {
"type": "string",
"enum": [
"NO_SERVICE_CONNECTION"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "The tip is too low to split between your recipients.",
"properties": {
"error": {
"type": "string",
"enum": [
"TIP_TOO_LOW"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "You cannot tip yourself.",
"properties": {
"error": {
"type": "string",
"enum": [
"NO_SELF_TIPS"
]
}
},
"required": [
"error"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Not enough balance to tip.",
"properties": {
"error": {
"type": "string",
"enum": [
"INSUFFICIENT_ACCOUNT_BALANCE"
]
},
"balance": {
"allOf": [
{
"$ref": "#/components/schemas/def-3"
}
],
"description": "Available balance for this currency."
}
},
"required": [
"error",
"balance"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Tip recipients are not recognized, unavailable or unreachable.",
"properties": {
"error": {
"type": "string",
"enum": [
"UNKNOWN_RECIPIENTS"
]
},
"unknown_recipients": {
"type": "array",
"description": "List of rejected recipient IDs.",
"items": {
"type": "string"
}
}
},
"required": [
"error",
"unknown_recipients"
],
"additionalProperties": false
}
]
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.tip.cc"
}
],
"security": [
{
"apiKey": [
"read",
"write"
]
},
{
"botAPIKey": [
"read",
"write"
]
}
],
"tags": [
{
"name": "user",
"description": "Endpoints for regular users"
},
{
"name": "bots",
"description": "Endpoints available for bots"
},
{
"name": "connections",
"description": "Platform connections"
},
{
"name": "auth",
"description": "Authentication endpoints and callbacks"
},
{
"name": "wallet",
"description": "All wallet-related endpoints"
},
{
"name": "transactions",
"description": "Transaction data"
},
{
"name": "tips",
"description": "Executing tips"
},
{
"name": "currencies",
"description": "Information for cryptocurrencies"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment