Skip to content

Latest commit

 

History

History
100 lines (81 loc) · 7.46 KB

File metadata and controls

100 lines (81 loc) · 7.46 KB

API Data Reference

Bitopro hackathon data API reference, organized from the provided PostgREST spec.

API

  • Base URL: https://aws-event-api.bitopro.com/
  • Swagger UI: https://aws-event-docs.bitopro.com/

Common Query Parameters

These query parameters are supported across all tables:

  • select: specify returned columns
    • Example: select=user_id,status
  • order: sort results
    • Example: order=created_at.desc
  • limit: limit number of rows
    • Example: limit=100
  • offset: pagination offset
  • Column names can be used directly as filters
    • Example: user_id=eq.123

Data Description

Some fields are de-identified:

  • IP -> hash
  • birthday -> age
  • wallet address -> hash

Basic Data and Labels

TABLE COLUMN TYPE COMMENT ENUM SAMPLE
user_info user_id bigint User ID (PK) 140
user_info sex integer Gender 0: undisclosed, 1: male, 2: female 1
user_info age integer Age. Official field is birthday; API provides de-identified age instead. 38
user_info career smallint Occupation 1: Agriculture, Forestry, Fishing and Animal Husbandry; 2: Mining and Quarrying; 3: Manufacturing; 4: Electricity and Gas Supply; 5: Water Supply and Remediation; 6: Construction; 7: Wholesale and Retail; 8: Transportation and Warehousing; 9: Accommodation and Food Services; 10: Publishing; 11: Information and Communication; 12: Technology; 13: Finance, Insurance and Securities; 14: Blockchain and Virtual Assets; 15: Real Estate Development/Brokerage; 16: Education; 17: Healthcare and Social Work; 18: Arts, Entertainment and Leisure; 19: Service Industry; 20: Military/Civil Service/Education; 21: Public Administration and National Defense; 22: Freelancer; 23: Unemployed; 24: Student; 25: Retired; 26: Small Business and Shops; 27: Professional Firms; 28: Food and Beverage; 29: Jewelers, Goldsmiths and Art Dealers; 30: Non-profit Organizations and Religious Groups; 31: Public Welfare Lottery and Sports Lottery 12
user_info income_source smallint Source of income Personal: 1: Salary, 2: Business Income, 3: Royalties, 4: Investments, 5: Rental Income, 6: Pension, 7: Other Income, 8: Inheritance/Gift, 9: Real Estate Trading, 10: No Income. Corporate: 1: Operating Income, 2: Non-operating Income, 3: Investment Gains, 4: Borrowed Funds, 5: Asset Disposal, 6: Financial Product Operations, 7: Fundraising, 8: Mining, 9: Idle Funds or Other 1
user_info confirmed_at datetime Email verification completion time 2018/02/06 15:26:28
user_info level1_finished_at datetime KYC Level 1 (mobile verification) completion time 2018/02/06 15:25:56
user_info level2_finished_at datetime KYC Level 2 (identity verification) completion time. Level 2 is required for fiat deposits/withdrawals. 2021/07/12 14:49:14
user_info user_source tinyint Registration source 0: WEB, 1: APP 1
train_label user_id bigint User ID (PK) 140
train_label status tinyint Account status, also used as prediction target 0: normal, 1: blacklist 0

Fiat Deposit and Withdrawal (TWD)

TABLE COLUMN TYPE COMMENT ENUM SAMPLE
twd_transfer id bigint Order ID (PK), added by API
twd_transfer created_at datetime Fiat deposit/withdrawal order creation time 2025/10/09 11:57:33
twd_transfer user_id bigint User ID initiating the fiat transaction 26
twd_transfer kind tinyint Transaction type 0: deposit, 1: withdrawal 1
twd_transfer ori_samount decimal Actual total amount. Real TWD amount should be multiplied by 1e-8. 998500000000
twd_transfer source_ip_hash varchar(64) IP at order time. Official field is source IP integer; API provides de-identified hash. Only available for internal initiated orders.

Order Book USDT/TWD Trades

TABLE COLUMN TYPE COMMENT ENUM SAMPLE
usdt_twd_trading id bigint Order ID (PK), added by API
usdt_twd_trading updated_at datetime Order completion time 2025/10/02 23:23:25
usdt_twd_trading user_id bigint User ID placing the order 2713
usdt_twd_trading is_buy tinyint Whether it is a buy order 0: sell (USDT -> TWD), 1: buy (TWD -> USDT) 1
usdt_twd_trading trade_samount decimal Filled base quantity. Real quantity should be multiplied by 1e-8. 262103105
usdt_twd_trading twd_srate decimal Actual TWD exchange rate. Real price should be multiplied by 1e-8. 3054000000
usdt_twd_trading source_ip_hash varchar(64) IP at order time. Official field is source IP integer; API provides de-identified hash. 27356118
usdt_twd_trading is_market tinyint Whether it is a market order 0: limit, 1: market 0
usdt_twd_trading source integer Order source terminal 0: WEB, 1: APP, 2: API 1

One-Click USDT Buy/Sell Trades

TABLE COLUMN TYPE COMMENT ENUM SAMPLE
usdt_swap id bigint Order ID (PK), added by API
usdt_swap created_at datetime Order completion time 2025/10/02 23:23:25
usdt_swap user_id bigint User ID placing the order 2713
usdt_swap kind tinyint Buy or sell 0: user buys coin (TWD -> USDT), 1: user sells coin (USDT -> TWD) 1
usdt_swap twd_samount decimal Filled TWD amount. Real quantity should be multiplied by 1e-8. 262103105
usdt_swap currency_samount decimal Filled crypto amount. Real quantity should be multiplied by 1e-8.

Crypto Deposit and Withdrawal

TABLE COLUMN TYPE COMMENT ENUM SAMPLE
crypto_transfer id bigint Order ID (PK), added by API
crypto_transfer created_at datetime Crypto transaction creation time 2025/10/12 07:02:52
crypto_transfer user_id bigint User ID initiating the crypto transaction 10023
crypto_transfer kind tinyint Transaction type 0: deposit, 1: withdrawal 1
crypto_transfer sub_kind tinyint Subtype 0: external (on-chain), 1: internal (exchange internal transfer) 0
crypto_transfer ori_samount decimal Actual original crypto amount. Real quantity should be multiplied by 1e-8. 814764500
crypto_transfer twd_srate decimal TWD exchange rate at transaction time. Real rate should be multiplied by 1e-8. 2047830000
crypto_transfer relation_user_id bigint Counterparty user ID for internal transfers 96357
crypto_transfer from_wallet_hash varchar(64) Sender wallet address. Official field is raw address; API provides de-identified hash.
crypto_transfer to_wallet_hash varchar(64) Receiver wallet address. Official field is raw address; API provides de-identified hash.
crypto_transfer protocol tinyint Blockchain protocol or network 0: Self (internal), 1: ERC20, 2: OMNI, 3: BNB, 4: TRC20, 5: BSC, 6: Polygon 4
crypto_transfer currency varchar Asset symbol ada
crypto_transfer source_ip_hash varchar(64) IP at order time. Official field is source IP integer; API provides de-identified hash. Only available for internally initiated orders.