Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.
This repository was archived by the owner on Jun 17, 2026. It is now read-only.

[Bug]: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992) #723

@icocoding

Description

@icocoding

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I used stream to get data on Mac air M1, got that error. Then I fixed it by myself.

stream = Stream(ALPACA_API_KEY,
                ALPACA_SECRET_KEY,
                data_feed='iex',
                )

error:
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)

Expected Behavior

No response

SDK Version I encountered this issue in

3.0.2

Steps To Reproduce

stream = Stream(ALPACA_API_KEY,
                ALPACA_SECRET_KEY,
                data_feed='iex',
                )

Filled out the Steps to Reproduce section?

  • I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

Anything else?

FIXED:

import ssl
sslcontext = ssl._create_unverified_context()

stream = Stream(ALPACA_API_KEY,
                ALPACA_SECRET_KEY,
                data_feed='iex',
                websocket_params=dict(ssl=sslcontext)
                )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions