import { Trade } from 'ccxt' ; import { ExchangeAdapter , tradePollIntervalField , authField , Field } from './base' ; const secretField = { name : 'password' , type : 'password' , prettyName : 'API password' , description : 'The password you set for this API key/secret pair.' , } ; const authTypes = typeof authField . type !== 'string' ? [ ... authField . type ] : null ; const coinbaseproAuthFields = { name : authField . name , type : [ ... authTypes , secretField ] , } ; export const coinbasepro = { fields : [ tradePollIntervalField , coinbaseproAuthFields ] , description : 'US based digital asset exchange with trading UI, FIX API and REST API.' , scan : 'back' , ratelimit : 1000 / 3 , mapTradeParams : ( after ) => { if ( after === null ) return null ; return { after } ; } , getTradeCursor : ( trade ) => { return Number ( trade . id ) ; } , } ;