UNPKG

finra-broker-check

Version:

Programmatically run searches against FINRA's Brokercheck database for acquiring Licensed Rep and Brokerage Firm data. I didn't see any documentation for their API, so I figured I'd try my hand at making a wrapper for their search tool. Users are able to

24 lines (15 loc) 604 B
const createBranch = require('./branch.js'); createBroker = (data) => { const Broker = { secNumber : parseInt(data.bc_sec_number), score : data.score, numberOfBranches : data.bc_branches_count, sourceId : parseInt(data.bc_source_id), name : data.bc_firm_name, otherNames : data.bc_other_names, finraApprovedRegistrationCount : data.bc_approved_finra_registration_count, branchLocations : (data.bc_branches && data.bc_branches.length > 0)?data.bc_branches.map((branch)=>{return createBranch(branch)}):[], } return Broker; } module.exports = createBroker;