
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
syscohada-banks
Advanced tools
Base de données complète des banques et systèmes de règlement de la zone OHADA (17 pays: UEMOA + CEMAC + Comores + Guinée + RDC)
Base de données complète des banques, systèmes de règlement, devises et Incoterms de la zone OHADA (UEMOA + CEMAC)
Extension majeure : Commerce international complet pour la zone OHADA !
npm install syscohada-banks
import {
getInstitutionsByCountry,
searchInstitutionsByName,
getInstitutionBySwiftCode
} from 'syscohada-banks';
// Banques du Sénégal
const senegalBanks = getInstitutionsByCountry('SN');
// Rechercher par nom
const ecobanks = searchInstitutionsByName('Ecobank');
// Rechercher par code SWIFT
const bank = getInstitutionBySwiftCode('ECOCSNDAXXX');
import {
convertCurrency,
getExchangeRate,
formatCurrency,
getCurrencyByCountry
} from 'syscohada-banks';
// Convertir 1 000 000 XOF en EUR
const conversion = convertCurrency(1000000, 'XOF', 'EUR');
console.log(conversion.toAmount); // 1524.49 EUR
// Taux de change
const rate = getExchangeRate('USD', 'XOF');
console.log(rate.rate); // ~615
// Formater un montant
const formatted = formatCurrency(1500000, 'XOF');
console.log(formatted); // "1 500 000 FCFA"
// Devise d'un pays OHADA
const currency = getCurrencyByCountry('SN'); // XOF
import {
getAllIncoterms,
getIncotermByCode,
getRecommendedIncoterm,
compareIncoterms
} from 'syscohada-banks';
// Tous les Incoterms
const incoterms = getAllIncoterms(); // 11 Incoterms
// Détails d'un Incoterm
const cif = getIncotermByCode('CIF');
console.log(cif.nameFr); // "Coût, assurance et fret"
// Recommandation pour un importateur OHADA
const recommended = getRecommendedIncoterm({
isExporter: false,
transportMode: 'SEA',
wantsInsurance: true,
isOHADA: true
});
console.log(recommended.code); // CIF
// Comparer FOB vs CIF
const comparison = compareIncoterms('FOB', 'CIF');
import {
getEuropeanPorts,
getTradeCorridorById,
getRegionalIncotermRecommendation,
getInternationalIncotermRecommendation
} from 'syscohada-banks';
// Ports européens
const euPorts = getEuropeanPorts();
console.log(euPorts[0].transitTimeToWestAfrica); // 12 jours
// Corridor Chine-UEMOA
const corridor = getTradeCorridorById('CHINA-UEMOA');
console.log(corridor.averageCostPerTEU); // 2800 USD
// Recommandations pour import depuis la Chine
const recom = getInternationalIncotermRecommendation({
partnerRegion: 'ASIA_PACIFIC',
partnerSubRegion: 'CHINA',
isExporter: false,
transportMode: 'SEA',
wantsInsurance: true
});
console.log(recom.recommended); // ['FOB', 'CFR', 'CIF']
console.log(recom.risks); // Risques spécifiques Chine
| Fonction | Description |
|---|---|
getAllInstitutions() | Toutes les institutions (123+) |
getInstitutionsByCountry(country) | Par pays (SN, CI, CM, etc.) |
getInstitutionsByZone(zone) | Par zone (UEMOA, CEMAC) |
getInstitutionsByGroup(group) | Par groupe (ECOBANK, BOA, UBA...) |
searchInstitutionsByName(term) | Recherche textuelle |
getInstitutionBySwiftCode(code) | Par code SWIFT |
validateSwiftCode(code) | Valider format SWIFT |
getStatsByCountry() | Statistiques par pays |
getStatsByGroup() | Statistiques par groupe |
| Fonction | Description |
|---|---|
getAllPaymentSystems() | Tous les systèmes |
getPaymentSystemsByType(type) | RTGS, NETTING, INSTANT, etc. |
getPaymentSystemsByCountry(country) | Par pays |
getRTGSSystems() | STAR-UEMOA, SYGMA, SAGETIL |
getInstantPaymentSystems() | PI-SPI, GIMACPAY |
calculateEstimatedFees(systemId, amount) | Calcul des frais |
getRecommendedPaymentSystems(amount, country, urgency) | Recommandations |
| Fonction | Description |
|---|---|
getAllMobileMoneyProviders() | Tous les opérateurs |
getMobileMoneyProvidersByCountry(country) | Par pays |
getUSSDCode(operator, country) | Code USSD (ex: *144#) |
getInteroperableMobileMoneyProviders(operator) | Interopérabilité |
| Fonction | Description |
|---|---|
getAllPaymentCorridors() | Tous les corridors |
getPaymentCorridor(from, to) | Entre deux pays |
getActivePaymentCorridors() | Corridors actifs |
Régionales : XOF (UEMOA), XAF (CEMAC) Internationales : EUR, USD, GBP, CHF, CNY, JPY, CAD, AED, SAR Africaines : NGN, GHS, ZAR, EGP, KES, MAD, TND, DZD, GNF, MRU, GMD, SLL, LRD, CVE
// Conversion complète avec frais
const result = convertCurrency(1000000, 'XOF', 'EUR', {
includeFees: true,
transactionType: 'TRANSFER'
});
// { fromAmount: 1000000, toAmount: 1524.49, rate: 0.001524, feeAmount: 6500, netAmount: 1514.09 }
// Conversion rapide
const amount = quickConvert(1000000, 'XOF', 'EUR'); // 1524.49
// Conversions directes
const xofAmount = convertToXOF(100, 'EUR'); // 65595.7
const eurAmount = convertFromXOF(1000000, 'EUR'); // 1524.49
| Fonction | Description |
|---|---|
getAllExchangeRates() | Tous les taux (~30 paires) |
getExchangeRate(from, to) | Taux direct |
getExchangeRateWithFallback(from, to) | Avec calcul indirect via pivot |
getFixedExchangeRates() | Taux fixes (CFA/EUR = 655.957) |
getExchangeRateHistory(from, to) | Historique 12 mois |
isFixedRate(from, to) | Vérifier si taux fixe |
| Fonction | Description |
|---|---|
calculateExchangeFee(amount, from, to, type) | Calcul des frais |
formatCurrency(amount, code) | Formatage avec symbole |
getCFAEuroFixedRate() | Taux fixe 655.957 |
Catégorie E : EXW (Ex Works) Catégorie F : FCA, FAS, FOB Catégorie C : CFR, CIF, CPT, CIP Catégorie D : DAP, DPU, DDP
| Fonction | Description |
|---|---|
getAllIncoterms() | 11 Incoterms complets |
getIncotermByCode(code) | Détails d'un Incoterm |
getIncotermsByCategory(cat) | Par catégorie (E, F, C, D) |
getSeaOnlyIncoterms() | Maritimes (FAS, FOB, CFR, CIF) |
getAnyModeIncoterms() | Tout mode de transport |
getRecommendedIncotermsForOHADA() | 7 recommandés pour OHADA |
compareIncoterms(code1, code2) | Comparaison détaillée |
getRecommendedIncoterm(options) | Recommandation intelligente |
| Fonction | Description |
|---|---|
getOHADARequiredDocuments(type) | Documents import/export |
getOHADAPorts(zone?) | Ports UEMOA/CEMAC |
getPortsByCountry(country) | Ports par pays |
calculateCustomsDuty(value, category) | Droits de douane TEC |
getIncotermsForLandlockedCountries() | Pour pays enclavés |
getIncotermResponsibilitySummary(code) | Résumé vendeur/acheteur |
const comparison = compareIncoterms('FOB', 'CIF');
// {
// sellerDifferences: ['Transport principal: FOB=Non, CIF=Oui', 'Assurance: FOB=Non, CIF=Oui'],
// riskDifference: 'Même point de transfert du risque',
// costDifference: 'HIGHER', // CIF plus cher pour le vendeur
// recommendation: 'Les deux Incoterms sont adaptés selon le contexte'
// }
Europe (7) : Rotterdam, Anvers, Hambourg, Le Havre, Marseille, Algésiras, Felixstowe Amérique (6) : New York, Houston, Los Angeles, Montréal, Santos, Buenos Aires Asie/Moyen-Orient (10) : Shanghai, Shenzhen, Singapour, Busan, Tokyo, Mumbai, Jebel Ali, etc.
| Fonction | Description |
|---|---|
getAllInternationalPorts() | 23 ports mondiaux |
getEuropeanPorts() | 7 ports européens |
getAmericanPorts() | 6 ports américains |
getAsianPorts() | 10 ports asiatiques |
getAfricaHubPorts() | 14 hubs pour l'Afrique |
getPortsByTransitTimeToWestAfrica() | Triés par temps de transit |
getInternationalPortByCode(code) | Par code (ex: NLRTM) |
searchInternationalPorts(term) | Recherche |
| Corridor | Transit | Coût/TEU | Incoterms |
|---|---|---|---|
| EU-UEMOA | 12 jours | $2,500 | CIF, CFR, FOB |
| EU-CEMAC | 18 jours | $3,200 | CIF, CIP, CFR |
| USA-UEMOA | 18 jours | $3,500 | CIF, CFR, FOB |
| CHINA-UEMOA | 28 jours | $2,800 | FOB, CFR, CIF |
| CHINA-CEMAC | 32 jours | $3,200 | FOB, CFR, CIF |
| INDIA-UEMOA | 18 jours | $2,000 | CFR, CIF, FOB |
| BRAZIL-UEMOA | 10 jours | $2,200 | CFR, CIF, FOB |
| UAE-OHADA | 20 jours | $2,500 | CIF, CFR, FOB |
| Fonction | Description |
|---|---|
getAllTradeCorridors() | 10 corridors |
getTradeCorridorById(id) | Par ID (ex: CHINA-UEMOA) |
getTradeCorridorsFromRegion(region) | Par région d'origine |
getTradeCorridorsByVolume() | Triés par volume |
estimateCorridorCost(id, TEUs) | Estimation coût |
getBestPortForCorridor(region, zone) | Meilleur port |
// Recommandation pour import depuis la Chine
const recom = getRegionalIncotermRecommendation('ASIA_PACIFIC', 'CHINA');
console.log(recom.importToOHADA.recommended); // ['FOB', 'CFR', 'CIF']
console.log(recom.importToOHADA.avoid); // ['DDP', 'DAP', 'EXW']
console.log(recom.customsNotes); // Notes douanières
console.log(recom.specificDocuments); // Documents requis
console.log(recom.risks); // Risques spécifiques
| Accord | Description |
|---|---|
| EPA_EU_AFRICA | Partenariat Économique UE-Afrique |
| AGOA | African Growth and Opportunity Act (USA) |
| GSP | Système Généralisé de Préférences |
| ZLECAF | Zone de Libre-Échange Continentale Africaine |
| CEDEAO | Communauté Économique des États de l'Afrique de l'Ouest |
const agreements = getTradeAgreementsByRegion('EUROPE');
// ['EPA_EU_AFRICA', 'GSP', 'WTO']
const description = getTradeAgreementDescription('AGOA');
// "African Growth and Opportunity Act - Accès préférentiel au marché US"
const stats = getInternationalTradeStats();
// {
// totalInternationalPorts: 23,
// africaHubPorts: 14,
// totalTradeVolume: 86.5, // milliards USD
// topPartners: [
// { region: 'ASIA_PACIFIC', volume: 45000, mainProducts: ['Électronique', 'Textiles'] },
// { region: 'EUROPE', volume: 23000, mainProducts: ['Équipements', 'Véhicules'] }
// ]
// }
interface Institution {
id: string; // Identifiant unique
name: string; // Nom complet
shortName?: string; // Acronyme
country: OHADACountry; // Code pays ISO (SN, CI, CM...)
zone: EconomicZone; // UEMOA | CEMAC
type: InstitutionType; // BANQUE | ETABLISSEMENT_FINANCIER | MICROFINANCE
group?: BankingGroup; // Groupe bancaire (ECOBANK, BOA...)
isBranch?: boolean; // Est une succursale
swiftCode?: string; // Code SWIFT/BIC
website?: string; // Site web
city?: string; // Ville du siège
foundedYear?: number; // Année de création
}
interface Currency {
code: CurrencyCode; // XOF, EUR, USD...
name: string; // Nom anglais
nameFr: string; // Nom français
symbol: string; // Symbole (FCFA, €, $...)
decimals: number; // Décimales (0 pour XOF, 2 pour EUR)
countries: string[]; // Pays utilisant cette devise
type: CurrencyType; // FIAT | REGIONAL | INTERNATIONAL
status: CurrencyStatus; // ACTIVE | INACTIVE | RESTRICTED
isOHADAReference?: boolean; // Devise OHADA (XOF, XAF)
isConvertible: boolean; // Convertibilité
economicZone?: EconomicZone; // Zone économique
}
interface ExchangeRate {
fromCurrency: CurrencyCode; // Devise source
toCurrency: CurrencyCode; // Devise cible
rate: number; // Taux de change
bidRate?: number; // Taux acheteur
askRate?: number; // Taux vendeur
spread?: number; // Écart (spread)
source: ExchangeRateSource; // BCEAO | BEAC | BCE | MARKET...
isFixed: boolean; // Taux fixe (CFA/EUR)
lastUpdated: string; // Date de mise à jour
change24h?: number; // Variation 24h (%)
change7d?: number; // Variation 7 jours (%)
}
interface CurrencyConversion {
fromCurrency: CurrencyCode;
toCurrency: CurrencyCode;
fromAmount: number; // Montant source
toAmount: number; // Montant converti
rate: number; // Taux appliqué
conversionFee?: number; // Pourcentage de frais
feeAmount: number; // Montant des frais
netAmount: number; // Montant net après frais
conversionDate: string; // Date de conversion
rateSource: ExchangeRateSource;
}
interface Incoterm {
code: IncotermCode; // EXW, FOB, CIF...
name: string; // Nom anglais
nameFr: string; // Nom français
category: IncotermCategory; // E, F, C, D
version: number; // 2020
transportModes: TransportMode[];
seaOnly: boolean; // Maritime uniquement
description: string; // Description anglais
descriptionFr: string; // Description français
riskTransferPoint: TransferPoint;
costTransferPoint: TransferPoint;
sellerResponsibilities: SellerResponsibilities;
buyerResponsibilities: BuyerResponsibilities;
requiredDocuments: string[]; // Documents requis
recommendedForOHADA: boolean; // Recommandé pour OHADA
africaNotes?: string; // Notes spécifiques Afrique
}
interface SellerResponsibilities {
packaging: boolean; // Emballage
loading: boolean; // Chargement
exportClearance: boolean; // Dédouanement export
mainCarriage: boolean; // Transport principal
insurance: boolean; // Assurance
importClearance: boolean; // Dédouanement import
unloading: boolean; // Déchargement
delivery: boolean; // Livraison
}
interface BuyerResponsibilities {
loading: boolean;
exportClearance: boolean;
mainCarriage: boolean;
insurance: boolean;
importClearance: boolean;
unloading: boolean;
delivery: boolean;
dutiesAndTaxes: boolean; // Droits et taxes
}
interface InternationalPort {
code: string; // Code port (NLRTM, CNSHA...)
name: string; // Nom du port
country: string; // Pays
countryCode: string; // Code ISO pays
region: TradeRegion; // EUROPE, ASIA_PACIFIC...
subRegion?: string; // Sous-région (EU, CHINA...)
type: 'SEA' | 'AIR' | 'RAIL' | 'MULTIMODAL';
annualVolume?: number; // Volume annuel (TEU)
worldRanking?: number; // Rang mondial
isAfricaHub?: boolean; // Hub pour l'Afrique
transitTimeToWestAfrica?: number; // Jours vers Afrique Ouest
transitTimeToCentralAfrica?: number; // Jours vers Afrique Centrale
mainShippingLines?: string[]; // Compagnies maritimes
notes?: string;
}
interface TradeCorridor {
id: string; // EU-UEMOA, CHINA-UEMOA...
name: string; // Nom du corridor
fromRegion: TradeRegion; // Région d'origine
toRegion: TradeRegion; // Région destination
fromCountries: string[]; // Pays d'origine
toCountries: string[]; // Pays destination
mainOriginPorts: string[]; // Ports d'origine
mainDestinationPorts: string[];// Ports destination
mainTransportMode: TransportMode;
recommendedIncoterms: IncotermCode[];
averageTransitTime: number; // Jours
averageCostPerTEU?: number; // Coût USD/TEU
tradeAgreements: TradeAgreement[];
mainProducts: string[]; // Produits principaux
annualVolume?: number; // Volume annuel (millions USD)
status: 'ACTIVE' | 'RESTRICTED' | 'SUSPENDED';
notes?: string;
}
interface RegionalIncotermRecommendation {
region: TradeRegion;
subRegion?: string;
exportFromOHADA: {
recommended: IncotermCode[];
avoid: IncotermCode[];
notes: string;
};
importToOHADA: {
recommended: IncotermCode[];
avoid: IncotermCode[];
notes: string;
};
customsNotes: string; // Notes douanières
specificDocuments: string[]; // Documents requis
averageClearanceTime: number; // Jours dédouanement
risks: string[]; // Risques à considérer
}
interface PaymentSystem {
id: string;
name: string;
shortName?: string;
type: PaymentSystemType; // RTGS | NETTING | INSTANT | MOBILE_MONEY...
category: PaymentCategory; // RETAIL | CORPORATE | INTERBANK
zone: EconomicZone | 'OHADA' | 'INTERNATIONAL';
countries: OHADACountry[];
status: PaymentSystemStatus; // ACTIVE | PILOT | PLANNED
operator?: string; // Opérateur
regulator?: string; // Régulateur
minAmount?: number; // Montant minimum
maxAmount?: number; // Montant maximum
baseFee?: string; // Frais de base
processingTime?: number; // Temps traitement (minutes)
operatingHours?: string; // Heures d'opération
supportedInstruments?: PaymentInstrument[];
features?: string[];
website?: string;
}
interface MobileMoneyProvider {
id: string;
name: string;
operator: MobileMoneyOperator; // ORANGE_MONEY | MTN_MOBILE_MONEY...
zone: EconomicZone | 'OHADA';
countries: OHADACountry[];
status: PaymentSystemStatus;
subscribers?: number; // Nombre d'abonnés
ussdCodes?: Record<OHADACountry, string>; // Codes USSD par pays
transactionLimits?: {
daily?: number;
monthly?: number;
perTransaction?: number;
};
interoperableWith?: MobileMoneyOperator[];
features?: string[];
}
// Pays
type OHADACountry = 'BJ' | 'BF' | 'CI' | 'GW' | 'ML' | 'NE' | 'SN' | 'TG' | 'CM' | 'CF' | 'CG' | 'GA' | 'GQ' | 'TD';
type UEMOACountry = 'BJ' | 'BF' | 'CI' | 'GW' | 'ML' | 'NE' | 'SN' | 'TG';
type CEMACCountry = 'CM' | 'CF' | 'CG' | 'GA' | 'GQ' | 'TD';
type EconomicZone = 'UEMOA' | 'CEMAC';
// Institutions
type InstitutionType = 'BANQUE' | 'ETABLISSEMENT_FINANCIER' | 'MICROFINANCE';
type BankingGroup = 'ECOBANK' | 'BOA' | 'UBA' | 'BGFI' | 'SOCIETE_GENERALE' | 'BANQUE_ATLANTIQUE' | 'CORIS' | 'NSIA' | 'ORABANK' | 'BSIC' | ...;
// Devises
type CurrencyCode = 'XOF' | 'XAF' | 'EUR' | 'USD' | 'GBP' | 'CHF' | 'CNY' | 'JPY' | 'NGN' | 'GHS' | 'ZAR' | 'MAD' | ...;
type CurrencyType = 'FIAT' | 'REGIONAL' | 'INTERNATIONAL';
type CurrencyStatus = 'ACTIVE' | 'INACTIVE' | 'RESTRICTED';
type ExchangeRateSource = 'BCEAO' | 'BEAC' | 'BCE' | 'FED' | 'MARKET' | 'OFFICIAL' | 'PARALLEL';
// Incoterms
type IncotermCode = 'EXW' | 'FCA' | 'FAS' | 'FOB' | 'CFR' | 'CIF' | 'CPT' | 'CIP' | 'DAP' | 'DPU' | 'DDP';
type IncotermCategory = 'E' | 'F' | 'C' | 'D';
type TransportMode = 'ANY' | 'SEA' | 'AIR' | 'ROAD' | 'RAIL' | 'MULTIMODAL';
type TransferPoint = 'SELLER_PREMISES' | 'CARRIER_FIRST' | 'PORT_OF_SHIPMENT' | 'PORT_OF_DESTINATION' | 'PLACE_OF_DESTINATION' | 'BUYER_PREMISES';
// Commerce international
type TradeRegion = 'EUROPE' | 'NORTH_AMERICA' | 'SOUTH_AMERICA' | 'ASIA_PACIFIC' | 'MIDDLE_EAST' | 'AFRICA' | 'OCEANIA';
type TradeAgreement = 'WTO' | 'EPA_EU_AFRICA' | 'AGOA' | 'GSP' | 'ZLECAF' | 'CEDEAO' | 'CEMAC_EU' | 'RCEP' | 'CPTPP' | 'USMCA';
// Paiements
type PaymentSystemType = 'RTGS' | 'NETTING' | 'INSTANT' | 'MOBILE_MONEY' | 'CROSS_BORDER' | 'E_MONEY' | 'BULK_PAYMENT';
type PaymentCategory = 'RETAIL' | 'CORPORATE' | 'INTERBANK';
type PaymentSystemStatus = 'ACTIVE' | 'PILOT' | 'PLANNED' | 'SUSPENDED';
type MobileMoneyOperator = 'ORANGE_MONEY' | 'MTN_MOBILE_MONEY' | 'MOOV_MONEY' | 'WAVE' | 'ECOBANK_XPRESS' | 'FREE_MONEY';
npm install syscohada-banks
// services/syscohada.service.ts
import { Injectable } from '@angular/core';
import {
Institution,
Currency,
Incoterm,
InternationalPort,
TradeCorridor,
OHADACountry,
CurrencyCode,
TradeRegion,
getAllInstitutions,
getInstitutionsByCountry,
searchInstitutionsByName,
getAllCurrencies,
convertCurrency,
formatCurrency,
getExchangeRate,
getAllIncoterms,
getIncotermByCode,
getRecommendedIncoterm,
compareIncoterms,
getAllInternationalPorts,
getEuropeanPorts,
getTradeCorridorById,
getRegionalIncotermRecommendation,
getInternationalTradeStats
} from 'syscohada-banks';
@Injectable({
providedIn: 'root'
})
export class SyscohadaService {
// ============ INSTITUTIONS ============
getAllBanks(): Institution[] {
return getAllInstitutions();
}
getBanksByCountry(country: OHADACountry): Institution[] {
return getInstitutionsByCountry(country);
}
searchBanks(term: string): Institution[] {
return searchInstitutionsByName(term);
}
// ============ DEVISES ============
getAllCurrencies(): Currency[] {
return getAllCurrencies();
}
convert(amount: number, from: CurrencyCode, to: CurrencyCode) {
return convertCurrency(amount, from, to);
}
format(amount: number, currency: CurrencyCode): string {
return formatCurrency(amount, currency);
}
getRate(from: CurrencyCode, to: CurrencyCode) {
return getExchangeRate(from, to);
}
// ============ INCOTERMS ============
getAllIncoterms(): Incoterm[] {
return getAllIncoterms();
}
getIncoterm(code: string) {
return getIncotermByCode(code as any);
}
getRecommendedIncoterm(options: {
isExporter: boolean;
transportMode: 'SEA' | 'AIR' | 'ROAD';
wantsInsurance: boolean;
isOHADA: boolean;
}) {
return getRecommendedIncoterm({
...options,
transportMode: options.transportMode as any,
handlesImportClearance: false
});
}
compareIncoterms(code1: string, code2: string) {
return compareIncoterms(code1 as any, code2 as any);
}
// ============ COMMERCE INTERNATIONAL ============
getAllPorts(): InternationalPort[] {
return getAllInternationalPorts();
}
getEuropeanPorts(): InternationalPort[] {
return getEuropeanPorts();
}
getCorridor(id: string): TradeCorridor | undefined {
return getTradeCorridorById(id);
}
getRegionalRecommendation(region: TradeRegion, subRegion?: string) {
return getRegionalIncotermRecommendation(region, subRegion);
}
getTradeStats() {
return getInternationalTradeStats();
}
}
// components/bank-selector/bank-selector.component.ts
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { FormControl } from '@angular/forms';
import { Observable } from 'rxjs';
import { map, startWith } from 'rxjs/operators';
import { SyscohadaService } from '../../services/syscohada.service';
import { Institution, OHADACountry } from 'syscohada-banks';
@Component({
selector: 'app-bank-selector',
template: `
<div class="bank-selector">
<mat-form-field>
<mat-label>Pays</mat-label>
<mat-select [formControl]="countryControl" (selectionChange)="onCountryChange()">
<mat-option *ngFor="let country of countries" [value]="country.code">
{{ country.name }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-label>Banque</mat-label>
<input matInput [formControl]="bankControl" [matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="onBankSelected($event)">
<mat-option *ngFor="let bank of filteredBanks$ | async" [value]="bank">
{{ bank.name }}
<small *ngIf="bank.swiftCode"> - {{ bank.swiftCode }}</small>
</mat-option>
</mat-autocomplete>
</mat-form-field>
</div>
`
})
export class BankSelectorComponent implements OnInit {
@Output() bankSelected = new EventEmitter<Institution>();
countryControl = new FormControl('SN');
bankControl = new FormControl('');
countries = [
{ code: 'SN', name: 'Sénégal' },
{ code: 'CI', name: 'Côte d\'Ivoire' },
{ code: 'CM', name: 'Cameroun' },
{ code: 'ML', name: 'Mali' },
{ code: 'BF', name: 'Burkina Faso' },
// ... autres pays
];
banks: Institution[] = [];
filteredBanks$!: Observable<Institution[]>;
constructor(private syscohada: SyscohadaService) {}
ngOnInit() {
this.loadBanks();
this.setupFilter();
}
loadBanks() {
const country = this.countryControl.value as OHADACountry;
this.banks = this.syscohada.getBanksByCountry(country);
}
setupFilter() {
this.filteredBanks$ = this.bankControl.valueChanges.pipe(
startWith(''),
map(value => this.filterBanks(value || ''))
);
}
filterBanks(value: string): Institution[] {
const filterValue = value.toLowerCase();
return this.banks.filter(bank =>
bank.name.toLowerCase().includes(filterValue) ||
bank.swiftCode?.toLowerCase().includes(filterValue)
);
}
onCountryChange() {
this.loadBanks();
this.bankControl.setValue('');
}
onBankSelected(event: any) {
this.bankSelected.emit(event.option.value);
}
}
// components/currency-converter/currency-converter.component.ts
import { Component } from '@angular/core';
import { SyscohadaService } from '../../services/syscohada.service';
import { Currency, CurrencyCode } from 'syscohada-banks';
@Component({
selector: 'app-currency-converter',
template: `
<div class="converter">
<mat-form-field>
<mat-label>Montant</mat-label>
<input matInput type="number" [(ngModel)]="amount" (ngModelChange)="convert()">
</mat-form-field>
<mat-form-field>
<mat-label>De</mat-label>
<mat-select [(ngModel)]="fromCurrency" (selectionChange)="convert()">
<mat-option *ngFor="let c of currencies" [value]="c.code">
{{ c.code }} - {{ c.nameFr }}
</mat-option>
</mat-select>
</mat-form-field>
<button mat-icon-button (click)="swap()">
<mat-icon>swap_horiz</mat-icon>
</button>
<mat-form-field>
<mat-label>Vers</mat-label>
<mat-select [(ngModel)]="toCurrency" (selectionChange)="convert()">
<mat-option *ngFor="let c of currencies" [value]="c.code">
{{ c.code }} - {{ c.nameFr }}
</mat-option>
</mat-select>
</mat-form-field>
<div class="result" *ngIf="result">
<h3>{{ result.formattedAmount }}</h3>
<p>Taux: 1 {{ fromCurrency }} = {{ result.rate | number:'1.4-4' }} {{ toCurrency }}</p>
<p *ngIf="result.feeAmount">Frais: {{ result.feeAmount | number }} {{ fromCurrency }}</p>
</div>
</div>
`
})
export class CurrencyConverterComponent {
currencies: Currency[] = [];
amount = 1000000;
fromCurrency: CurrencyCode = 'XOF';
toCurrency: CurrencyCode = 'EUR';
result: any = null;
constructor(private syscohada: SyscohadaService) {
this.currencies = this.syscohada.getAllCurrencies();
this.convert();
}
convert() {
const conversion = this.syscohada.convert(this.amount, this.fromCurrency, this.toCurrency);
if (conversion) {
this.result = {
...conversion,
formattedAmount: this.syscohada.format(conversion.toAmount, this.toCurrency)
};
}
}
swap() {
[this.fromCurrency, this.toCurrency] = [this.toCurrency, this.fromCurrency];
this.convert();
}
}
npm install syscohada-banks
// hooks/useSyscohada.ts
import { useState, useMemo, useCallback } from 'react';
import {
Institution,
Currency,
Incoterm,
InternationalPort,
OHADACountry,
CurrencyCode,
TradeRegion,
getAllInstitutions,
getInstitutionsByCountry,
searchInstitutionsByName,
getAllCurrencies,
convertCurrency,
formatCurrency,
getExchangeRate,
getAllIncoterms,
getIncotermByCode,
getRecommendedIncoterm,
compareIncoterms,
getAllInternationalPorts,
getTradeCorridorById,
getRegionalIncotermRecommendation,
getInternationalTradeStats,
IncotermCode
} from 'syscohada-banks';
// Hook pour les banques
export function useBanks(country?: OHADACountry) {
const banks = useMemo(() => {
return country ? getInstitutionsByCountry(country) : getAllInstitutions();
}, [country]);
const searchBanks = useCallback((term: string) => {
return searchInstitutionsByName(term);
}, []);
return { banks, searchBanks };
}
// Hook pour les devises
export function useCurrency() {
const currencies = useMemo(() => getAllCurrencies(), []);
const convert = useCallback((
amount: number,
from: CurrencyCode,
to: CurrencyCode
) => {
return convertCurrency(amount, from, to);
}, []);
const format = useCallback((amount: number, code: CurrencyCode) => {
return formatCurrency(amount, code);
}, []);
const getRate = useCallback((from: CurrencyCode, to: CurrencyCode) => {
return getExchangeRate(from, to);
}, []);
return { currencies, convert, format, getRate };
}
// Hook pour les Incoterms
export function useIncoterms() {
const incoterms = useMemo(() => getAllIncoterms(), []);
const getIncoterm = useCallback((code: IncotermCode) => {
return getIncotermByCode(code);
}, []);
const recommend = useCallback((options: {
isExporter: boolean;
transportMode: 'SEA' | 'AIR' | 'ROAD';
wantsInsurance: boolean;
isOHADA: boolean;
}) => {
return getRecommendedIncoterm({
...options,
transportMode: options.transportMode as any,
handlesImportClearance: false
});
}, []);
const compare = useCallback((code1: IncotermCode, code2: IncotermCode) => {
return compareIncoterms(code1, code2);
}, []);
return { incoterms, getIncoterm, recommend, compare };
}
// Hook pour le commerce international
export function useInternationalTrade() {
const ports = useMemo(() => getAllInternationalPorts(), []);
const stats = useMemo(() => getInternationalTradeStats(), []);
const getCorridor = useCallback((id: string) => {
return getTradeCorridorById(id);
}, []);
const getRecommendation = useCallback((region: TradeRegion, subRegion?: string) => {
return getRegionalIncotermRecommendation(region, subRegion);
}, []);
return { ports, stats, getCorridor, getRecommendation };
}
// components/BankSelector.tsx
import React, { useState, useMemo } from 'react';
import { useBanks } from '../hooks/useSyscohada';
import { Institution, OHADACountry } from 'syscohada-banks';
interface BankSelectorProps {
onSelect: (bank: Institution) => void;
}
const countries = [
{ code: 'SN' as OHADACountry, name: 'Sénégal' },
{ code: 'CI' as OHADACountry, name: 'Côte d\'Ivoire' },
{ code: 'CM' as OHADACountry, name: 'Cameroun' },
{ code: 'ML' as OHADACountry, name: 'Mali' },
{ code: 'BF' as OHADACountry, name: 'Burkina Faso' },
];
export const BankSelector: React.FC<BankSelectorProps> = ({ onSelect }) => {
const [country, setCountry] = useState<OHADACountry>('SN');
const [search, setSearch] = useState('');
const { banks, searchBanks } = useBanks(country);
const filteredBanks = useMemo(() => {
if (!search) return banks;
return banks.filter(b =>
b.name.toLowerCase().includes(search.toLowerCase()) ||
b.swiftCode?.toLowerCase().includes(search.toLowerCase())
);
}, [banks, search]);
return (
<div className="bank-selector">
<select
value={country}
onChange={(e) => setCountry(e.target.value as OHADACountry)}
>
{countries.map(c => (
<option key={c.code} value={c.code}>{c.name}</option>
))}
</select>
<input
type="text"
placeholder="Rechercher une banque..."
value={search}
onChange={(e) => setSearch(e.target.value)}
/>
<ul className="bank-list">
{filteredBanks.map(bank => (
<li key={bank.id} onClick={() => onSelect(bank)}>
<strong>{bank.name}</strong>
{bank.swiftCode && <span className="swift">{bank.swiftCode}</span>}
{bank.group && <span className="group">{bank.group}</span>}
</li>
))}
</ul>
</div>
);
};
// components/CurrencyConverter.tsx
import React, { useState, useEffect } from 'react';
import { useCurrency } from '../hooks/useSyscohada';
import { CurrencyCode } from 'syscohada-banks';
export const CurrencyConverter: React.FC = () => {
const { currencies, convert, format } = useCurrency();
const [amount, setAmount] = useState(1000000);
const [from, setFrom] = useState<CurrencyCode>('XOF');
const [to, setTo] = useState<CurrencyCode>('EUR');
const [result, setResult] = useState<any>(null);
useEffect(() => {
const conversion = convert(amount, from, to);
if (conversion) {
setResult({
...conversion,
formatted: format(conversion.toAmount, to)
});
}
}, [amount, from, to, convert, format]);
const swap = () => {
setFrom(to);
setTo(from);
};
return (
<div className="currency-converter">
<div className="input-group">
<input
type="number"
value={amount}
onChange={(e) => setAmount(Number(e.target.value))}
/>
<select value={from} onChange={(e) => setFrom(e.target.value as CurrencyCode)}>
{currencies.map(c => (
<option key={c.code} value={c.code}>{c.code} - {c.nameFr}</option>
))}
</select>
</div>
<button onClick={swap} className="swap-btn">⇄</button>
<div className="input-group">
<select value={to} onChange={(e) => setTo(e.target.value as CurrencyCode)}>
{currencies.map(c => (
<option key={c.code} value={c.code}>{c.code} - {c.nameFr}</option>
))}
</select>
</div>
{result && (
<div className="result">
<h3>{result.formatted}</h3>
<p>Taux: 1 {from} = {result.rate.toFixed(4)} {to}</p>
</div>
)}
</div>
);
};
// components/IncotermAdvisor.tsx
import React, { useState } from 'react';
import { useIncoterms, useInternationalTrade } from '../hooks/useSyscohada';
import { TradeRegion } from 'syscohada-banks';
export const IncotermAdvisor: React.FC = () => {
const { recommend } = useIncoterms();
const { getRecommendation } = useInternationalTrade();
const [isExporter, setIsExporter] = useState(false);
const [region, setRegion] = useState<TradeRegion>('EUROPE');
const [transportMode, setTransportMode] = useState<'SEA' | 'AIR' | 'ROAD'>('SEA');
const [wantsInsurance, setWantsInsurance] = useState(true);
const recommended = recommend({
isExporter,
transportMode,
wantsInsurance,
isOHADA: true
});
const regionalRecom = getRecommendation(region);
return (
<div className="incoterm-advisor">
<h2>Conseiller Incoterms</h2>
<div className="options">
<label>
<input
type="checkbox"
checked={isExporter}
onChange={(e) => setIsExporter(e.target.checked)}
/>
Je suis exportateur (depuis OHADA)
</label>
<select value={region} onChange={(e) => setRegion(e.target.value as TradeRegion)}>
<option value="EUROPE">Europe</option>
<option value="ASIA_PACIFIC">Asie</option>
<option value="NORTH_AMERICA">Amérique du Nord</option>
<option value="SOUTH_AMERICA">Amérique du Sud</option>
<option value="MIDDLE_EAST">Moyen-Orient</option>
</select>
<select value={transportMode} onChange={(e) => setTransportMode(e.target.value as any)}>
<option value="SEA">Maritime</option>
<option value="AIR">Aérien</option>
<option value="ROAD">Routier</option>
</select>
<label>
<input
type="checkbox"
checked={wantsInsurance}
onChange={(e) => setWantsInsurance(e.target.checked)}
/>
Assurance souhaitée
</label>
</div>
{recommended && (
<div className="recommendation">
<h3>Incoterm recommandé: {recommended.code}</h3>
<p>{recommended.nameFr}</p>
<p>{recommended.descriptionFr}</p>
</div>
)}
{regionalRecom && (
<div className="regional-advice">
<h3>Conseils pour {region}</h3>
<div>
<h4>Recommandés:</h4>
<ul>
{(isExporter ? regionalRecom.exportFromOHADA : regionalRecom.importToOHADA)
.recommended.map(code => <li key={code}>{code}</li>)}
</ul>
</div>
<div>
<h4>Risques:</h4>
<ul>
{regionalRecom.risks.map((risk, i) => <li key={i}>{risk}</li>)}
</ul>
</div>
</div>
)}
</div>
);
};
npm install syscohada-banks
// composables/useSyscohada.ts
import { ref, computed, Ref } from 'vue';
import {
Institution,
Currency,
Incoterm,
OHADACountry,
CurrencyCode,
TradeRegion,
IncotermCode,
getAllInstitutions,
getInstitutionsByCountry,
searchInstitutionsByName,
getAllCurrencies,
convertCurrency,
formatCurrency,
getExchangeRate,
getAllIncoterms,
getIncotermByCode,
getRecommendedIncoterm,
compareIncoterms,
getAllInternationalPorts,
getTradeCorridorById,
getRegionalIncotermRecommendation,
getInternationalTradeStats
} from 'syscohada-banks';
// Composable pour les banques
export function useBanks(country?: Ref<OHADACountry | undefined>) {
const banks = computed(() => {
return country?.value
? getInstitutionsByCountry(country.value)
: getAllInstitutions();
});
const searchBanks = (term: string) => searchInstitutionsByName(term);
return { banks, searchBanks };
}
// Composable pour les devises
export function useCurrency() {
const currencies = computed(() => getAllCurrencies());
const convert = (amount: number, from: CurrencyCode, to: CurrencyCode) => {
return convertCurrency(amount, from, to);
};
const format = (amount: number, code: CurrencyCode) => {
return formatCurrency(amount, code);
};
const getRate = (from: CurrencyCode, to: CurrencyCode) => {
return getExchangeRate(from, to);
};
return { currencies, convert, format, getRate };
}
// Composable pour les Incoterms
export function useIncoterms() {
const incoterms = computed(() => getAllIncoterms());
const getIncoterm = (code: IncotermCode) => getIncotermByCode(code);
const recommend = (options: {
isExporter: boolean;
transportMode: 'SEA' | 'AIR' | 'ROAD';
wantsInsurance: boolean;
isOHADA: boolean;
}) => {
return getRecommendedIncoterm({
...options,
transportMode: options.transportMode as any,
handlesImportClearance: false
});
};
const compare = (code1: IncotermCode, code2: IncotermCode) => {
return compareIncoterms(code1, code2);
};
return { incoterms, getIncoterm, recommend, compare };
}
// Composable pour le commerce international
export function useInternationalTrade() {
const ports = computed(() => getAllInternationalPorts());
const stats = computed(() => getInternationalTradeStats());
const getCorridor = (id: string) => getTradeCorridorById(id);
const getRecommendation = (region: TradeRegion, subRegion?: string) => {
return getRegionalIncotermRecommendation(region, subRegion);
};
return { ports, stats, getCorridor, getRecommendation };
}
<!-- components/BankSelector.vue -->
<template>
<div class="bank-selector">
<select v-model="selectedCountry">
<option v-for="c in countries" :key="c.code" :value="c.code">
{{ c.name }}
</option>
</select>
<input
v-model="searchTerm"
type="text"
placeholder="Rechercher une banque..."
/>
<ul class="bank-list">
<li
v-for="bank in filteredBanks"
:key="bank.id"
@click="selectBank(bank)"
>
<strong>{{ bank.name }}</strong>
<span v-if="bank.swiftCode" class="swift">{{ bank.swiftCode }}</span>
<span v-if="bank.group" class="group">{{ bank.group }}</span>
</li>
</ul>
</div>
</template>
<script setup lang="ts">
import { ref, computed, toRef } from 'vue';
import { useBanks } from '../composables/useSyscohada';
import type { Institution, OHADACountry } from 'syscohada-banks';
const emit = defineEmits<{
(e: 'select', bank: Institution): void;
}>();
const countries = [
{ code: 'SN' as OHADACountry, name: 'Sénégal' },
{ code: 'CI' as OHADACountry, name: 'Côte d\'Ivoire' },
{ code: 'CM' as OHADACountry, name: 'Cameroun' },
{ code: 'ML' as OHADACountry, name: 'Mali' },
{ code: 'BF' as OHADACountry, name: 'Burkina Faso' },
];
const selectedCountry = ref<OHADACountry>('SN');
const searchTerm = ref('');
const { banks } = useBanks(toRef(() => selectedCountry.value));
const filteredBanks = computed(() => {
if (!searchTerm.value) return banks.value;
const term = searchTerm.value.toLowerCase();
return banks.value.filter(b =>
b.name.toLowerCase().includes(term) ||
b.swiftCode?.toLowerCase().includes(term)
);
});
const selectBank = (bank: Institution) => {
emit('select', bank);
};
</script>
<!-- components/CurrencyConverter.vue -->
<template>
<div class="currency-converter">
<div class="input-group">
<input v-model.number="amount" type="number" />
<select v-model="fromCurrency">
<option v-for="c in currencies" :key="c.code" :value="c.code">
{{ c.code }} - {{ c.nameFr }}
</option>
</select>
</div>
<button @click="swap" class="swap-btn">⇄</button>
<div class="input-group">
<select v-model="toCurrency">
<option v-for="c in currencies" :key="c.code" :value="c.code">
{{ c.code }} - {{ c.nameFr }}
</option>
</select>
</div>
<div v-if="result" class="result">
<h3>{{ formattedResult }}</h3>
<p>Taux: 1 {{ fromCurrency }} = {{ result.rate.toFixed(4) }} {{ toCurrency }}</p>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, computed, watch } from 'vue';
import { useCurrency } from '../composables/useSyscohada';
import type { CurrencyCode } from 'syscohada-banks';
const { currencies, convert, format } = useCurrency();
const amount = ref(1000000);
const fromCurrency = ref<CurrencyCode>('XOF');
const toCurrency = ref<CurrencyCode>('EUR');
const result = ref<any>(null);
const formattedResult = computed(() => {
if (!result.value) return '';
return format(result.value.toAmount, toCurrency.value);
});
const updateResult = () => {
result.value = convert(amount.value, fromCurrency.value, toCurrency.value);
};
const swap = () => {
const temp = fromCurrency.value;
fromCurrency.value = toCurrency.value;
toCurrency.value = temp;
};
watch([amount, fromCurrency, toCurrency], updateResult, { immediate: true });
</script>
<!-- components/IncotermAdvisor.vue -->
<template>
<div class="incoterm-advisor">
<h2>Conseiller Incoterms</h2>
<div class="options">
<label>
<input type="checkbox" v-model="isExporter" />
Je suis exportateur (depuis OHADA)
</label>
<select v-model="region">
<option value="EUROPE">Europe</option>
<option value="ASIA_PACIFIC">Asie</option>
<option value="NORTH_AMERICA">Amérique du Nord</option>
<option value="SOUTH_AMERICA">Amérique du Sud</option>
<option value="MIDDLE_EAST">Moyen-Orient</option>
</select>
<select v-model="transportMode">
<option value="SEA">Maritime</option>
<option value="AIR">Aérien</option>
<option value="ROAD">Routier</option>
</select>
<label>
<input type="checkbox" v-model="wantsInsurance" />
Assurance souhaitée
</label>
</div>
<div v-if="recommended" class="recommendation">
<h3>Incoterm recommandé: {{ recommended.code }}</h3>
<p>{{ recommended.nameFr }}</p>
<p>{{ recommended.descriptionFr }}</p>
</div>
<div v-if="regionalRecom" class="regional-advice">
<h3>Conseils pour {{ region }}</h3>
<div>
<h4>Recommandés:</h4>
<ul>
<li v-for="code in currentRecommendations.recommended" :key="code">
{{ code }}
</li>
</ul>
</div>
<div>
<h4>À éviter:</h4>
<ul>
<li v-for="code in currentRecommendations.avoid" :key="code">
{{ code }}
</li>
</ul>
</div>
<div>
<h4>Risques:</h4>
<ul>
<li v-for="(risk, i) in regionalRecom.risks" :key="i">
{{ risk }}
</li>
</ul>
</div>
<div>
<h4>Documents requis:</h4>
<ul>
<li v-for="(doc, i) in regionalRecom.specificDocuments" :key="i">
{{ doc }}
</li>
</ul>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, computed } from 'vue';
import { useIncoterms, useInternationalTrade } from '../composables/useSyscohada';
import type { TradeRegion } from 'syscohada-banks';
const { recommend } = useIncoterms();
const { getRecommendation } = useInternationalTrade();
const isExporter = ref(false);
const region = ref<TradeRegion>('EUROPE');
const transportMode = ref<'SEA' | 'AIR' | 'ROAD'>('SEA');
const wantsInsurance = ref(true);
const recommended = computed(() => {
return recommend({
isExporter: isExporter.value,
transportMode: transportMode.value,
wantsInsurance: wantsInsurance.value,
isOHADA: true
});
});
const regionalRecom = computed(() => {
return getRecommendation(region.value);
});
const currentRecommendations = computed(() => {
if (!regionalRecom.value) return { recommended: [], avoid: [] };
return isExporter.value
? regionalRecom.value.exportFromOHADA
: regionalRecom.value.importToOHADA;
});
</script>
// plugins/syscohada.ts
import { App } from 'vue';
import * as syscohada from 'syscohada-banks';
export default {
install(app: App) {
app.config.globalProperties.$syscohada = syscohada;
app.provide('syscohada', syscohada);
}
};
// main.ts
import { createApp } from 'vue';
import App from './App.vue';
import syscohadaPlugin from './plugins/syscohada';
createApp(App)
.use(syscohadaPlugin)
.mount('#app');
MIT © Hypnoz Team
Dernière mise à jour: Décembre 2025 - v2.1.0
FAQs
Base de données complète des banques et systèmes de règlement de la zone OHADA (17 pays: UEMOA + CEMAC + Comores + Guinée + RDC)
The npm package syscohada-banks receives a total of 6 weekly downloads. As such, syscohada-banks popularity was classified as not popular.
We found that syscohada-banks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.